4 ms·
Pretty star-studded cast you have on the core team, there. What's your motivation, aside from modernizing Facebook's code base? What language niche does Hack s
by Locke1689 13y ago
Pretty star-studded cast you have on the core team, there.
What's your motivation, aside from modernizing Facebook's code base? What language niche does Hack serve which is not served by other languages? Why Facebook at all (aside from the rarity of finding a company to pay you to write a compiler :))?
- bos 13y agoThe sweet spot that Hack hits is that it combines gradual typing (an idea that hasn't yet seen much real-world adoption) with an incredibly fast typechecker. This lets you choose the pace and extent to which you want to adopt the safety of static typing, while preserving your dynamically typed code -- and without sacrificing the rapid turnaround of PHP. That's a unique combination, in my experience.
- Confusion 13y agoHow does your approach compare to Typed Racket and Typed Clojure? Could they conceivably achieve the same performance or is there a fundamental difference?
- webjprgm 13y agoDoes Typed Racket have DrRacket support for instant feedback on errors? (It didn't 4+ years ago when I used Racket.) Typed Racket also includes more types, like ": Integer [more precisely: Negative-Fixnum]" (from docs), as well as polymorphic data structures and higher-order functions. I don't know if this is a "fundamental difference" but it might mean Facebook's type checker can optimize in certain ways that Racket's cannot.
- samth 13y agoYes, Typed Racket does have that -- DrRacket continuously expands in the background, so Typed Racket gets it for free by integrating into the macro system. The Typed Racket type checker is much slower than Hack, though. Hack does seem to have polymorphic data structures and higher-order functions.