News for hackers. Stuff that matters.
Re:Hack: a new programming language for HHVM by mlubin on Thursday March 20, 2014 @12:30PM (#7436601)
"Hack provides instantaneous type checking via a local server that watches the filesystem."

What does this mean?

Re:Hack: a new programming language for HHVM by bos on Thursday March 20, 2014 @12:32PM (#7436618)
On Linux, we use the inotify subsystem to be informed every time you save a source file or switch branches. The hh_server process can then update its data structures immediately, without being explicitly asked.
Re:Hack: a new programming language for HHVM by wink on Thursday March 20, 2014 @12:34PM (#7436653)
I don't really get why this is the second paragraph on the page of a language though. It's like touting the jar command in an overview of Java.
Re:Hack: a new programming language for HHVM by bos on Thursday March 20, 2014 @12:41PM (#7436714)
Because this is tremendously important to the usability of the language.

One of the reasons that PHP has been such a success is that you can simply save a source file and reload a web page to see what's going on.

The server-based typechecker that runs instantaneously is what makes it possible for Hack to replicate this experience: you save a file and reload a web page, but you have the safety net of a typechecker that told you about your type errors as soon as you saved the file.

I can't overstate how important this instant feedback is: it's really the thing that distinguishes Hack from working in a more traditional compile-based static language.

Re:Hack: a new programming language for HHVM by 6cxs2hd6 on Thursday March 20, 2014 @12:46PM (#7436754)
Adding static typing to a dynamic language means that more work must be done at compile time than at run time.

One appeal of dynamic languages is you don't have a long compile time[1].

So I imagine they emphasize this to address the worry that this will get ruined and there will be a horrible workflow.

[1] However Turbo Pascal was a one-pass typed compiler in the early 80s that was blazingly fast with 1 MHz CPUs and 64 KB RAM. :)

Re:Hack: a new programming language for HHVM by amenghra on Thursday March 20, 2014 @12:43PM (#7436733)
The fact that we wanted the type system to be instantaneous drove some of our design decisions.
Re:Hack: a new programming language for HHVM by acorkery on Thursday March 20, 2014 @12:44PM (#7436739)
Was it debated whether this should be a tooling feature - thinking of an IDE plugin that parses and type-checks in the background rather than a dedicated service to watch text files on disk
Re:Hack: a new programming language for HHVM by reikonomusha on Thursday March 20, 2014 @12:45PM (#7436743)
In Hack's case, the language is the implementation anyway.