Hacker News new | ask | show | jobs
by kmavm 3196 days ago
I'm chief architect at Slack, and we migrated to Hack from PHP 5 throughout 2016.

The toolchain for HHVM is all installed as a single big deliverable, which gives you the language engine and supporting runtime libraries itself, an in-address-space web server (Facebook's Proxygen), a debugger in the form of hhvm -a, and the Hacklang toolchain accessed via hh_client and appropriate editor/IDE integrations.

I share your intuition that there is actually a glittering core of "stuff-that-makes-you-successful" hiding in the incidental complexity of PHP, and we wrote this blog post trying to put some substance behind that intuition: https://slack.engineering/taking-php-seriously-cf7a60065329

3 comments

I have essentially created a private facebook that has no friends, yet the same person continues to show up as the first person in the pymk, javascript in the HTTPWATCH that I downloaded.. why is that? I already removed them from the suggested friends when it was pulled up - but every single time they have pulled up as the very first after my ID in the code. If I were to send you the code privately could you explain it to me??
Wouldn't it make more sense to take the parts of the PHP runtime environment that enable rapid prototyping and figure out how to implement them in a language that has a working == operator rather than trying to graft type safety on a language that has both strpos() and str_rot13()?

Remember BML, bradfitz' attempt to do this with Perl?

I would love to see someone do something similar for Python.

> a language that has a working == operator

== has always been working in PHP. I know maybe that optional type coercition trips up some noobs occasionally before they made any effort to learn the language (hint === doesn't coerce types for equality), but how low effort does a complaint have to be?

Type coercition is actually pretty cool when you're not really sure what the browser or client is about to http at you and you just want it to work. It's much better than crashing at runtime because '12' isn't a number. If you're input isn't sane, throw an exception or use a validation library.

Now if we're talking about a good type system that can be enforced at compile time like rust, Scala, etc. Sign me up. But if it's run time, it's run time, we gotta keep going.

> It's much better than crashing at runtime because '12' isn't a number.

something something yell at you for breaking their door

You also helped start HHVM, Keith :).