Live data from Hacker News

Hack: a new programming language for HHVM

code.facebook.com

101–110 of 422 posts

Re: Hack: a new programming language for HHVM

#101

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…

This seems an unequivocal improvement for Facebook, since they're unwilling to move away from PHP. The better question is why would anyone else choose to build their company on this?

Re: Hack: a new programming language for HHVM

#102
post #59

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…

As far as I can tell they are using local inference, which is basically just unification. The set of possible types seems pretty narrow[1] as well so I don't see much room to go wrong. You're right that there is a lot of mathematical theory about type systems and that inference can easily go wrong (be undecidable) but that is mostly for type systems that try to do inference for higher rank polymorphism and other thin…

Local inference isn't just unification. In particular, most local inference algorithms are designed to work with subtyping, which doesn't work in ML-like type systems.

Re: Hack: a new programming language for HHVM

#103
post #55
post #3

I'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.

Hi and thanks, Are you planning a Windows build ? do you think Hack could replace all PHP stacks (PHP cloud stacks , not talking about shared host wordpress toys) in a 5 years time frame ? What do you think about the current state of PHP? what would you tell PHP core devs about that? Does an async frameworks like React runs with Hack? What can you answer to people that are concerned that it is Facebook who is develop…

> Are you planning a Windows build ?

Yes. auroraeosrose is working on it (the same person who did the port for php) https://github.com/auroraeosrose/hhvm/tree/win32_start

Re: Hack: a new programming language for HHVM

#104
post #3

I'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.

Is there any interest in adding named parameters to Hack?

That's coming in PHP 5.7 anyhow. It's been implemented and works, but Nikita Popov hasn't had the time to change the function definitions of the standard library to work with it, hence PHP 5.6 won't have it, sadly.

Re: Hack: a new programming language for HHVM

#105
post #98
post #87

Earlier quoted context omitted.

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…

a) WTH? I hope you do not test your code in production. If you don't that feature (a ide that constantly compiles your code) is a common feature. 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.

a) You don't have a development server/VM?

b) Not everyone has programmers. That was his point

Re: Hack: a new programming language for HHVM

#108
post #14

Earlier quoted context omitted.

I'd rephrase the question to be "Would Facebook be Facebook without PHP?"

I don't see why not. It's possible to have done it any any mainstream language.

Which mainstream language would you have chosen in 2003 that you think would have had similar success?

Re: Hack: a new programming language for HHVM

#110
post #90

This rubs me the wrong way. > Thus, Hack was born. We believe that it offers the best of both dynamically typed and statically typed languages, and that it will be valuable to projects of all sizes. In which way does it offer the benefits of dynamic typing? The entire point seems to be to abandon dynamic typing, which is fine, but not what that sentence says. I'm guessing, for example, you can't really do meta-progra…

It's more accurate to say that the point is to let you use dynamic typing where that makes sense, and static typing in the many cases where it helps. Hence "best of both".
Post reply on HN