Posts with the tag hacklang:

Hack: Types

Facebook’s Hack bring lots of features that a lot of other programming languages get to take advantage of. One of major advantages of Hack over PHP is a typing system. So here’s a quick run over of the typing system as I understand it. Annotate Annotating is when you define which type is going to be used. You can type the following: function arguments function return class variable constants For function arguments you just put the type before the variable name for the argument.