Announcement

Collapse
No announcement yet.

Facebook Releases HHVM 4.0 With PHP No Longer Supported

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    I expect they have plans to diverge Hack even further from PHP to improve it and thus they want to brake the chains of maintaining PHP compatibility so that they can achieve that more easily.

    Comment


    • #12
      Seriously why would any sane person use Facebook or technology coming from that company? When one tally’s up a list of evil companies Facebook will be very high on the list.

      Comment


      • #13
        Originally posted by wizard69 View Post
        Seriously why would any sane person use Facebook or technology coming from that company? When one tally’s up a list of evil companies Facebook will be very high on the list.
        I would make a distinction between using Facebook products and using Facebook open source code. I hate Microsoft, but that wouldn't keep me away from C# if C# happened to be the best fit of something I was working on. Likewise for Facebook.

        Originally posted by uid313 View Post
        What advantages does Hack have over PHP nowadays?
        Does Facebook themselves even want to use Hack?
        Wouldn't Facebook rather want to use something else like Go, Kotlin, C# or Python?
        It seems nobody outside Facebook is really using Hack so why are they pursuing it?
        Hack isn't that different from PHP, even now, and adds optional type annotations that are checked. I think the two reasons Facebook is using Hack is that they have a colossal PHP codebase and they want some level of static type checking without rewriting the whole thing and better performance than regular PHP. The performance advantage is gone with PHP 7, but the type checking is still a value. Facebook might also have a full rewrite in Go, Kotlin, D, Haskell, etc... in progress, I have no idea, but Hack is probably their way to improve quality on the existing code while they wait for a rewrite to finish.

        I really think this is why languages like Typescript, Groovy, and Perl 6 are a great idea. Just hack (see what I did there?) something together to get your Minimum Viable Product into production, and then evolve it into something with good static type checks later. It also makes your language newbie-friendly, they can get started just playing with dynamically typed code first and then learn the static type system later without having to change languages.

        Comment


        • #14
          Originally posted by Michael_S View Post
          Hack isn't that different from PHP, even now, and adds optional type annotations that are checked. I think the two reasons Facebook is using Hack is that they have a colossal PHP codebase and they want some level of static type checking without rewriting the whole thing and better performance than regular PHP. The performance advantage is gone with PHP 7, but the type checking is still a value.
          I guess Hack still have better type checking. But it seems the upcoming PHP 7.4 will have improved type checking.
          The Typed Properties 2.0 RFC was accepted with a vote of 70 in favor and one no vote. A 2/3 majority is required because typed properties is a language change. The typed property change is a PHP 7.4 proposal. Learn more about the new syntax and type-safe proposal for class properties.


          Originally posted by Michael_S View Post
          Facebook might also have a full rewrite in Go, Kotlin, D, Haskell, etc... in progress, I have no idea, but Hack is probably their way to improve quality on the existing code while they wait for a rewrite to finish.
          A full rewrite wouldn't be needed. There are microservices. They use lots of React which consumes JSON, so the backend shouldn't matter.

          Originally posted by Michael_S View Post
          I really think this is why languages like Typescript, Groovy, and Perl 6 are a great idea. Just hack (see what I did there?) something together to get your Minimum Viable Product into production, and then evolve it into something with good static type checks later. It also makes your language newbie-friendly, they can get started just playing with dynamically typed code first and then learn the static type system later without having to change languages.
          Ah, you mean optional typing. Good point about optional typing. Python have support for it too (enforced at dev time by tools not at runtime).

          Comment


          • #15
            Originally posted by uid313 View Post
            I guess Hack still have better type checking. But it seems the upcoming PHP 7.4 will have improved type checking.
            https://laravel-news.com/php7-typed-properties
            Interesting. I hadn't looked at PHP in years, I didn't know it even had that much of a formal type system.

            Originally posted by uid313 View Post
            A full rewrite wouldn't be needed. There are microservices. They use lots of React which consumes JSON, so the backend shouldn't matter.
            Interesting. I thought the Facebook server side code was pretty monolithic in PHP. Microservices certainly make sense in this context, I just didn't know they used them.

            Originally posted by uid313 View Post
            Ah, you mean optional typing. Good point about optional typing. Python have support for it too (enforced at dev time by tools not at runtime).
            Python has everything. I'm not sure how Typescript enforces type annotations. I'm pretty sure Groovy and Perl 6 enforce them at runtime.

            Comment


            • #16
              Originally posted by Michael_S View Post
              Interesting. I thought the Facebook server side code was pretty monolithic in PHP. Microservices certainly make sense in this context, I just didn't know they used them.
              I don't know how their application and backend looks, but Facebook made React so I assume they use React which consumes state which can be serialized from JSON so then any backend could be used and microservices would be a good fit. Everyone talks about microservices, so I would guess Facebook use them too.

              Originally posted by Michael_S View Post
              Python has everything. I'm not sure how Typescript enforces type annotations. I'm pretty sure Groovy and Perl 6 enforce them at runtime.
              TypeScript transpiles into JavaScript.
              So the TypeScript compiler can enforce typing at compile time but then is no for them anymore at runtime.
              You can also configure the TypeScript compiler with rules on how what to enforce and not. There is also the "any" type which can be used to represent any type.

              Comment


              • #17
                Originally posted by msotirov View Post
                I imagine they might feel a bit burned by supporting PHP as people basically "stole" their optimizations for PHP7 and then no one cared about HHVM
                While the performance of PHP7 may have stolen the spotlight, the approaches that HHVM and PHP7 took to get there are drastically different. HHVM implemented a JIT while PHP7 just polished the existing interpreter.

                Comment


                • #18
                  Originally posted by Michael_S View Post
                  Interesting. I thought the Facebook server side code was pretty monolithic in PHP. Microservices certainly make sense in this context, I just didn't know they used them.
                  Facebook have been around a long time now. Maybe ten years ago, in 2009, it was one big monolith, but it would be pretty surprising if that were still the case today...

                  Comment


                  • #19
                    Originally posted by uid313 View Post
                    TypeScript transpiles into JavaScript.
                    So the TypeScript compiler can enforce typing at compile time but then is no for them anymore at runtime.
                    You can also configure the TypeScript compiler with rules on how what to enforce and not. There is also the "any" type which can be used to represent any type.
                    I knew TypeScript transpiles into JavaScript. I just wasn't sure if it adds anything to the resulting JavaScript to enforce runtime type checks manually. I guess it doesn't - which makes sense because unless a runtime has builtin type checking adding manual checks at the entrance and exits of every function is a big performance drain. Clojure core.typed hasn't really taken off for that reason - the more types you use, the slower it gets compared to regular Clojure. The Perl 6 and Groovy runtimes, on the other hand, have runtimes with type checking built in so specifying types has no impact on speed.
                    Last edited by Michael_S; 13 February 2019, 07:55 AM. Reason: grammar fix

                    Comment


                    • #20
                      Originally posted by Delgarde View Post

                      Facebook have been around a long time now. Maybe ten years ago, in 2009, it was one big monolith, but it would be pretty surprising if that were still the case today...
                      That makes complete sense. But for example I work at a company that had a colossal monolithic application in 2009, and has a colossal monolithic application today. (They pay well and my teammates and managers are nice, so I'm not leaving.) Some places have a lot of institutional momentum preventing evolution. Upper management finally decided to put the monolith into maintenance mode and build the next generation with a completely separate set of tools - probably Spark + REST + React. But until the new hotness hits production, the monolith is the cash cow and most of the engineering staff will be keeping the lights on there.

                      Comment

                      Working...
                      X