4 ms·
It's a shame that Hack didn't replace PHP in general use. I didn't see a mention in the article, but it was created to be exactly this safer/faster/more elegant
by darknoon 7y ago
It's a shame that Hack didn't replace PHP in general use. I didn't see a mention in the article, but it was created to be exactly this safer/faster/more elegant version of PHP. For example, it has a broad type system including generics.
My first decent sized codebase was web site for my high school in vanilla PHP. It was a total mess (mostly due to my lack of experience and the need to support Netscape 4.7). I understand that some PHP apps are good, though I got burned by WordPress vulnerabilities enough to swear it off.
I wrote a little code in Hack while at fb, and the incremental typing was slowly evolving a messy codebase to some kind of order. (https://hacklang.org https://hacklang.org)
- timw4mail 7y agoWordpress is not PHP. Wordpress would be just as bad in Hack.
- Implicated 7y agoSeconding this. As someone who built (5 years ago now) and maintains a client application that runs along side a Wordpress/WooCommerce shop of pretty high volume - it's absolutely mind blowing to me the kinds of decisions that Automattic/Wordpress/WooCommerce make... from a code and operation viewpoint.
- xixixao 7y agoI agree, it's a shame we don't push Hack more broadly (in general I think the reason is our teams are focused on internal adoption and improvements, and don't feel they would benefit from supporting open source community), it's such a pragmatic language, so familiar that folks pick it up super quickly, it's getting an awesome standard library now, it's a got a great type system, great IDE integration, scales to our bizillion lines of code...
- wink 7y agoI think part of it was because it was being pushed at all. I didn't see a lot of collaboration from Hack towards PHP. It was a - sadly typical - "Hey, here's our thing, it's better". A few select individuals came forward (or were part of PHP core already) but it felt like a Silo, so I'm not surprised there wasn't a lot of participation from outside. PHP 7 and the speed improvements were a direct answer to HHVM, though.