The big “HACK” signs reputed to adorn the walls of Facebook offices aren't just a command from His Royal Zuckness: The Social Network also uses a programming language called “Hack” and has just given it to the world. Facebook describes Hack as “a programming language we developed for HHVM that interoperates seamlessly with PHP” …
I wish they wouldn't pick words like this for programming language names. It makes it hard when people are searching for code samples later on in Google. Go suffers the same problem.
Search results for HACK scripts or codes might lead you to dangerous websites.
Talks like "so I used a HACK script" in both academic studies and corporate business might also cause trouble, despite how it looks cool in your résumé.
When I dabbled with Groovy a few years ago, Google tended to be more amusing then enlightening.
I had to use Wikipedia to learn that HHVM stands for Hip Hop Virtual Machine. Even the HHVM.com site doesn't tell you what it means.
According to Wikipedia, it was open-sourced in 2010.
What does "hack" do that K&R C, PERL, and inline assembler doesn't do in the hands of a programmer who knows what s/he is doing with code?
Oh. Never mind.
Wow, you mean I'll need a skilled programmer whenever I want minor changes made to my website? That's such a bonus. I'll stop using PHP immediately, fire all my junior programmers, employ some experienced people and double my pricing.
@AC "17 hours ago (whatever '17 hours ago' means, ElReg)" Was:Re: Question.
Hire one skilled programmer and fire a dozen or so so-called "web programmers". Far better cash-flow, after benefits & other overhead.
Note that most experienced programmers grok PHP, ruby, et alia ... and know when that kind of option isn't exactly the most efficient way to run a
Haskell, Go, Scala, Dart come to mind...
This has nothing to do with Web2.0 and everything to do with computer programmers.
There are as many languages as there are programmers; some just haven't seen the light of day yet.
...and half the time the documentation leaves something to be desired. This wiki will be updated soon, meh.
Cant be arsed to learn someone elses language
so I'll write my own and discover all the pitfalls along the way the other languages have sorted out.
Shit, even I can call C++ libraries from PHP which means I don’t need to actually have to find out which version of PHP the website is using today.
Please let this replace PHP in the long term. There is no way this cannot be an improvement over the original.
Improving on PHP is not that difficult. Almost anything is better than PHP.
Don't take me wrong, the vast amount of libraries available somewhat compensate for its ugliness and "anything goes" attitude. But its basic flaws, which is what hack tries to fix, are horrible sins in large scale software development.
Yet, when you have a huge codebase supporting a billion dollar business, you can't easily migrate away from it, so your best and effectively only choice is to evolve the language.
I honestly can't think of too many alternative languages that are as mature and would be able to operate at the same scale on the same hardware investment though.
Python and Ruby possibly but nowhere near as battle tested at scale as PHP. Especially since with HipHop it's effectively just running C/C++. Good luck to them I say for pushing the limits and feeding that back.
Perl, they could use Perl.
Hopefully I can now point to the description of Hack - adding in many of things that statically typed languages had - the next time some idiot decides to try and force a PHP applicaiton on me. At a previous company we got a consultant in to produce a web application for us, and we stipulated it be written in Java and use our existing data access layer. The consultants developer came in, and I set up his laptop with a working copy of our code and even walked him through the development of a representative chunk of functionality from data access to user interface. Several months later, a zip file of PHP was delivered that used its own data store (MongoDB). When challenged on why the f*ckwit had done this the developer claimed PHP was better than Java since Facebook use it. Worst part is that my boss still paid the consultant (turns out they were friends) despite the consultant clearly being in breach of contract. In the end we didn't even deploy the PHP app, which would have been a maintenance nightmare since we had no way of updating the MongoDB database (the developer had created it from the PostgreSQL instance I had put on his laptop and never provided us with whatever he'd used to populate MongoDB).
re: " At a previous company we got a consultant in to produce a web application for us, and we stipulated it be written in Java and use our existing data access layer."
I'm afraid its 100% down to bad management on you or your bosses part, and a fail from the guy employed to do the job - but it's no fault of PHP whatsoever.
Doesn't sound like PHP's fault to me. Sounds like you should actually be angry at your boss for buying a crap software developer/crap human.
The problem with PHP is that most developers started off as website designers who then followed some Wordpress plugin tutorials. It's easy to weed out the flakes.
I have seen some remarkably bad PHP, and I'm not crazy about the language. But there is an interesting case made for Facebook's work in "Taking PHP Seriously", which you can find at http://www.infoq.com/presentations/php-history .
None of this is relevant. Faecesbook is already in decline and hopefully their hack language will die with it.
- Hi-torque tank engines: EXTREME car hacking with The Register
- Review What's MISSING on Amazon Fire Phone... and why it WON'T set the world alight
- Product round-up Trousers down for six of the best affordable Androids
- Antique Code Show World of Warcraft then and now: From Orcs and Humans to Warlords of Draenor
- Why did it take antivirus giants YEARS to drill into super-scary Regin? Symantec responds...