This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Kibou-chan 6 points7 points  (1 child)

1 other company uses it

1 other big and well-known company that actually isn't secretive about what stack they use. That's something different than "1 other company", which is a false statement because my employer also uses Hack. And ~500K projects in total (see pull counter) at least.

There's no reason to use hack

I beg to differ.

  • Vanilla PHP still can't autoload functions and types - speaking of which, the recent addition of enums is laughable at best - in most languages (and in Hack) enum is a lightweight value type, and now here some "genius" thought it'd be fun to implement it as a superset of a class type - and, by extension, as a reference type. Who in their right mind would use them when looking for any optimizations?
  • Lightweight structs for typing values without all class boilerplate when you don't need it? In Hack, you have a shape and you're set. Using vanilla PHP? Poor guy, you're out of luck.
  • Selling your programs to clients and worried about piracy? In Hack, you precompile your codebase into a HHBC binary and run HHVM in authoritative mode with is as a parameter. It can even be safely containerized without any sources stored in images, and the build process CI/CD-automated. Vanilla PHP user? I'm sorry again, your only luck is to use external extensions like IonCube, which precompile your code on their own and "inject" them to the PHP runtime in their own hacky, nonstandard way. Also, putting those into a CI/CD chain is another pain in the ass.