Edit : i just forgot that i still haven't found any server side language i'm satisfied with. I'm still waiting for a type-annotated variant of python to catch on.... So maybe hack would be a good choice after all. It's such a pity they started this work based on php rather than any other cleaner language.
Hack: a new programming language for HHVM
281–290 of 422 posts
Re: Hack: a new programming language for HHVM
#282I'm the manager of the team that developed Hack, and I'm sitting here with some of the language designers. Happy to answer your questions.
Re: Hack: a new programming language for HHVM
#283Re: Hack: a new programming language for HHVM
#284Earlier quoted context omitted.
> What major accomplishments in computing that have been built atop crumbling foundations can claim anything even close to the scale of success of these examples? Wikipedia and Facebook?
Yahoo!, too, is a heavy PHP user.
Re: Hack: a new programming language for HHVM
#285Earlier quoted context omitted.
Engineering decisions made in 2003 need not dictate the future of the company more than a decade later. Keep the systems that are written in PHP around for their nature life. Write new systems in whatever is more sensible at the time. Lazy-load your way out of shitsville. Of course this is vastly complicated if they been neglecting modularity and SOA for the past decade and most of facebook is still a monolith.....
Pretty much only the front-end code is written in PHP (or Hack, I guess). Services (things like the feed, the typeahead, graph search, messages, &c.) are written in C++ and other languages - ie, the things it is sensible to write them in...
Do you know if Facebook is still trying to operate out of a single mercurial repository? Or is that only for the front-end code with services having their own repositories?
Re: Hack: a new programming language for HHVM
#286Re: Hack: a new programming language for HHVM
#287Earlier quoted context omitted.
PHP is a "crumbling foundation" in exactly the same way DOS, Windows, COBOL, and C and C++ were, are, "crumbling foundations". I don't see how you are disagreeing with me. You are proving the point. You aren't actually going to claim that Windows was well-conceived and theoretically well-founded, are you? Windows has been a never ending refinement on exceptionally shaky ground.
"Windows has been a never ending refinement on exceptionally shaky ground." No. Windows NT was a complete rewrite and it was " well-conceived and theoretically well- founded"
Most of the time, you're talking to Win32/64 or high-level services based on DCOM or .NET, where the "well-conceived" and "theoretically well-founded" stuff doesn't turn up. You can go your whole career without knowing that there's a well-designed kernel under all that cruft.
I'd guess that less than half of Windows developers could say what the object manager does.
Re: Hack: a new programming language for HHVM
#288I am baffled as to why you'd build your castle atop a crumbling foundation. I have wondered why FB didn't use a proper language with proper typing to begin with. I mean, I "understand" logistically: they already had a giant codebase in PHP, migrating a codebase is expensive, and it's difficult to hire and train 1000s of hackers in e.g., OCaml. (They do have some OCaml people, but they are outliers. OCaml was my favor…
The HN crowd seems to dislike (or despise perhaps?) PHP, but it's really not that bad. Yes it has a lot of warts, but it has a lot of things that make it nice for web development. a) try your new code by saving in your editor, and hitting reload in your web browser. b) it's very approachable. People who only know HTML and CSS can be expected to do a little bit of PHP work to integrate their changes. If you setup the…
Is there anything about PHP, the language, that lends itself to this style of development, or could you get these same benefits with, say, Ruby or Python?
Re: Hack: a new programming language for HHVM
#289Earlier quoted context omitted.
> Personally, I'd have expected you to make something akin to CoffeeScript or ClojureScript that targets PHP, and can "link with" your existing PHP modules. We took a similar approach to what you described. Then we called it Hack. This is what we mean by seamless inter-operation: the HHVM runtime understands both syntaxes and runs both <?php and <?hh code in the same process. Whether Hack integrates into the runtime…
But the syntax you've got now is effectively a superset of PHP, and comes with all the problems of PHP. You've effectively wrapped your Big Ball of Mud... in slightly different-colored mud. The whole point of a clean-break-targeting-interoperability like this is that you can stop using mud at all , and it'll still work with what you've got now. In fact, what other reason would you have ? If you mean that future versi…
That's not to say that syntax doesn't matter, but semantics and pragmatics tends to matter more, despite Wadler's Law of Language Design stating that most people don't understand this.
Re: Hack: a new programming language for HHVM
#290Earlier quoted context omitted.
C, simple and predictable? You've got to be kidding me: http://lwn.net/Articles/586838/
It can definitely be simple, but if you're writing C you're compiling directly on hardware. If you change the hardware, your program will not run. That is literally the definition of unreliable.