I 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…
Hack: a new programming language for HHVM
91–100 of 422 posts
Re: Hack: a new programming language for HHVM
#92I'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.
Could the same techniques you applied to PHP be applied to other dynamic languages like Ruby or Python?
Re: Hack: a new programming language for HHVM
#93I 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 language definition and semantic checker are difficult, but are stereotypically tasks that cannot be distributed to many engineers; instead, a few senior engineers took that task to the benefit of all others.
Re: Hack: a new programming language for HHVM
#94Earlier quoted context omitted.
Why use public string $x = ''; instead of public $x:string = ''; It seems inconsistent to me, probably because I've used AS3/Haxe.
PHP is based on C. It's way more consistent with C, Java, C# , etc to do the former. So the real question is why function foobar() : int { .. } instead of function int foobar() { .. }
Re: Hack: a new programming language for HHVM
#95Re: Hack: a new programming language for HHVM
#96Earlier quoted context omitted.
At a glance it looks like Hack is to PHP what TypeScript is to JavaScript. Is that a fair analogy?
Yes and no. Yes, because TypeScript is bringing a type-system to a dynamically typed language and so did Hack. No: because Hack is bringing some additional language features affecting the runtime. Modest changes for now, but we intend to carry on in that direction.
Re: Hack: a new programming language for HHVM
#97I haven't looked this over too much but I'm curious as to why they did this: instead of this: The first seems inconsistent to me. Especially coming from AS3/Haxe where the function return value is indicated in the same manner.
Re: Hack: a new programming language for HHVM
#98I 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…
b) Theorem: Leting your web designers program is a way worse than letting your programmers do web design.
c) Every simple project can become complex at some point. Facebook certainly is.
Re: Hack: a new programming language for HHVM
#99Re: Hack: a new programming language for HHVM
#100I 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…
HHVM replaced the execution environment for their code with a more robust code generation/ runtime system.
Hack allows them to bootstrap their code base into higher degrees of reliability without a mass rewrite.
Also Brian O'Sullivan is one of the best people on the face of the earth to be trying to find practical ways on integrating PL research into practical engineering.