Feeds

back to article Facebook hacks out PHP alternative

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” …

COMMENTS

This topic is closed for new posts.
Anonymous Coward

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.

9
0
Anonymous Coward

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é.

0
0
Bronze badge

Indeed

When I dabbled with Groovy a few years ago, Google tended to be more amusing then enlightening.

1
0
Silver badge

HHVM

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.

3
0
Silver badge

Question.

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.

3
4
Anonymous Coward

Re: Question.

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.

2
0
Silver badge

@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 railroadwebsite.

3
0
Silver badge

Great

Seems like in the Web 2.0 world, the solution to every problem is "create a new programming language". Add this to Java, Javascript, Ajax, XUL, HTML5, C#, PHP, Python, Rust, Ruby, Ruby on Rails and wait, what are the 59 others I'm missing?

5
0
Silver badge

Re: Great

Haskell, Go, Scala, Dart come to mind...

Though to be fair some of those have met real needs. JavaScript in particular was necessary, as there was no other language running on the browser at the time.

1
0
Silver badge

Re: Great

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.

0
1
WTF?

Re: Great

...and half the time the documentation leaves something to be desired. This wiki will be updated soon, meh.

1
0
Silver badge

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.

3
0
Silver badge
Go

Good

Please let this replace PHP in the long term. There is no way this cannot be an improvement over the original.

0
4
Anonymous Coward

Re: Good

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.

6
1
Bronze badge

Re: Good

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.

ASP.NET? Java/Scala?

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.

0
0
Anonymous Coward

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).

1
2

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.

5
0
Bronze badge

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.

2
0

This post has been deleted by its author

Bronze badge

Umm

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 .

2
0
Bronze badge
FAIL

Not relevant

None of this is relevant. Faecesbook is already in decline and hopefully their hack language will die with it.

0
3
This topic is closed for new posts.