Static Typing
Hack adds static typing to PHP, which helps catch type-related errors early and improves code quality and maintainability.
Async Programming Support
Hack has built-in support for asynchronous programming, making it easier to write non-blocking, high-performance applications.
Compatibility with PHP
Hack is designed to be compatible with existing PHP code, making it easier for developers to transition from PHP to Hack without completely rewriting their codebase.
Type Annotations
With type annotations, developers can specify the types of variables, return types of functions, and parameter types, which leads to more readable and self-documenting code.
Collections API
Hack provides a rich collections API, which includes various data structures like Vector, Map, and Set, making it easier to work with data in a type-safe way.
Integrated Development Environment (IDE) Support
IDE tools like HHVM and Hack development environments provide robust support for Hack, offering features such as autocompletion, real-time type checking, and error detection.
What ever happened to Hack (https://hacklang.org) the language Meta built as a superset of PHP? Why not take an approach more similar to TypeScript? I sometimes do wonder if many of the server side rendering approaches (or alternative Node runtimes) would be better off trying to emulate some aspects of PHP.
– Source: Hacker News
/
16 days ago
On top of all that, now we want to make JavaScript type-safe. So let’s add 10 more configuration files, add a compiler, and now we have bullcrap^2. Just like Facebook invented HackLang, Microsoft invented TypeScript, but only companies of this magnitude need such features. The average Joe from Delaware does not need all that.
– Source: dev.to
/
4 months ago
PHP results: Is Hack still popular with PHP people? I was stupid enough to write some scientific code in PHP once so know how slow it can be. But if your going to do try write performant code in PHP use the HHVM interpreter. It’s much faster. Hack (https://hacklang.org/) uses that under the hood by default.
– Source: Hacker News
/
9 months ago
Meta: hacklang.org has the details there. It forked off of PHP ~5 years ago, and is no longer backwards compatible. I believe this is also what Slack uses.
Source:
over 1 year ago
Facebook literally created Hack because PHP wasn’t meeting their needs at the time.
Source:
over 1 year ago
Well, yeah, since they generally don’t kill popular projects. Hell hack is still getting updates even though no one ever gave a shit about it. Meanwhile Flutter can be cancelled tomorrow because another division made Clutter and they have more “political” pull at google…
Source:
about 2 years ago
They actually create/use Hack. Haxe is something else.
Source:
about 2 years ago
He also pointed out that the one-time GCC Java implementation never ran afoul of the Java trademark. Unsurprisingly at this point, Leighton disagreed: “sorry, Mark, you’re still misunderstanding, on multiple levels and in so many ways I am having a hard time tracking them all”. The conversation did not improve from there until David Edelsohn said (in an apparently private message quoted by Leighton) that the…
– Source: Hacker News
/
about 2 years ago
There already is a fork, https://hacklang.org/. It didn’t fracture the community, people just don’t use hack.
– Source: Hacker News
/
over 2 years ago
If you want better types, have you taken a look at Hack? https://hacklang.org.
– Source: Hacker News
/
over 2 years ago
Most languages are afraid to for some reason, most likely because it “breaks tradition” or whatever. The only languages I’m aware of that allow this are Hack (for C-like enums) and my language Star (for both C-like and OCaml-like enums).
Source:
almost 3 years ago
I can’t install hhvm for trying out hack https://hacklang.org/ on arch.
Source:
almost 3 years ago
They use their own version of PHP, Hack. It’s generally the same plus typing. I hate it.
Source:
almost 3 years ago
Yes, Facebook scaled with it, but it was massively painful. There’s a reason they developed Hack as a replacement for plain PHP.
Source:
about 3 years ago
Support of Hack(which already support generics) dropped.
Source:
about 3 years ago
You can do some pretty cool stuff with https://hacklang.org/.
Source:
about 3 years ago
Actually, there are a lot of things wrong with it. Which is why Facebook isn’t really written in PHP but in Hack, their own in-house variant of PHP with a lot of custom patches.
Source:
over 3 years ago
If you ever need to work with PHP, use PHP/Hack developed by Facebook: https://hacklang.org/ It’s a compiled language built partially in Rust, being rewritten entirely in Rust, JIT compiled using HHVM: https://hhvm.com/ I don’t believe it’s compatible with existing PHP codebases, but you could probably convert one over in a straightforward way, catching safety issues while you did it. Hack a modern and highly…
– Source: Hacker News
/
over 3 years ago
It was originally used, then they wrote their own version called Hack (https://hacklang.org/) which ran on the custom HipHop Virtual Machine, and now…now like most very large things, they use a variety of languages to accomplish different goals. It’s rare to find something the size of Amazon, Facebook, any of Google’s offerings, etc. Which are monolingual anymore, whether that’s because they’re using…
Source:
over 3 years ago