Live data from Hacker News

Hack: a new programming language for HHVM

code.facebook.com

141–150 of 422 posts

Re: Hack: a new programming language for HHVM

#141
post #108

Earlier quoted context omitted.

Which mainstream language would you have chosen in 2003 that you think would have had similar success?

Any. Really, any. Facebook is throwing a lot of engineering effort into fixing things that now matter to them, but didn't when they started (and were small). They could have picked Perl CGI's and it'd still have happened (perhaps Perl 6 would be a success these days). I don't think PHP has played any role in bringing FB to the size it is today (programming language does not translate to number of users signing up). S…

Do you think perl would have been much better? Either way, the point that he was making was that there were pretty slim pickings back then. Certainly the dominant languages/frameworks of WD these days (python, ruby, node) didn't exist. Or by another token, the only dominant one that was also strong back then is PHP, the one they chose.

Re: Hack: a new programming language for HHVM

#142

Earlier quoted context omitted.

Is there any interest in adding named parameters to Hack?

That's coming in PHP 5.7 anyhow. It's been implemented and works, but Nikita Popov hasn't had the time to change the function definitions of the standard library to work with it, hence PHP 5.6 won't have it, sadly.

Wow, I haven't kept up with things, but gosh that sounds pretty great. Type checking + named params is a fairly difficult combination of great language features to find in the same language.

Re: Hack: a new programming language for HHVM

#144
post #16
post #3

I'm the manager of the team that developed Hack, and I'm sitting here with some of the language designers. Happy to answer your questions.

Is this just syntax sugar or there are performance improvements upon php?

Static types are more than syntactic sugar, they allow you to make additional guarantees about the behavior of the code, like having unit tests without actually writing them.

I program in php every day and miss static typing (as opt-in mechanism). Sadly i'm on windows and use oracle, so hhvm is not applicable.

Re: Hack: a new programming language for HHVM

#145
post #135

Earlier quoted context omitted.

a) You don't have a development server/VM? b) Not everyone has programmers. That was his point

Oh, for b) i know a bonmot. Sorry for the image. http://fettemama.org:6502/ed2499a7aa73df6dcefe95fbb649ece3

Not everyone that needs/wants to make a website wants to start a software development company. Often then just want to accomplish a few small things. To match up the rest of your examples:

I was to defend myself in small claims court

I want to learn some first aid

I want to build a shed behind my house

Re: Hack: a new programming language for HHVM

#146
post #133

Earlier quoted context omitted.

>The fast development cycle -- edit php script, refresh -- is something amazing that you don't get in a lot of statically typed languages You seriously think that? That's how we do haskell web development. Both yesod and snap do this out of the box. That's how every java developer I know works.

I have a little bit by way of Haskell chops, and I'll venture that the performance of the Hack typechecker is a very big deal, and it is in a different breed than the turnaround time you get from snap or yesod (or Java).

"Type checking is faster than other statically typed languages" is quite different from "other statically typed languages don't offer this workflow", which is what was claimed.

Re: Hack: a new programming language for HHVM

#148

Man, it's going to be really hard to search the Internet to troubleshoot this. Search: "Hack Anonymous Function" Search: "Hack Background Process"

As a frequent user of R, this is one of my biggest pet peeves. There are a practically infinite number of unique, interesting, pronounceable, google-able names for a new programming language, yet we continue to get stuck with this shit.

Re: Hack: a new programming language for HHVM

#149
post #18

Naming a language hack ... very poor choice. Searching for Go, C, C++ is already bad, now you can add hack to the list.

Hacklang. There, just like go, problem solved.

That would only solve the problem if everyone referred to it as "Hacklang", which will surely not be the case.
Post reply on HN