> Thus, Hack was born. We believe that it offers the best of both dynamically typed and statically typed languages, and that it will be valuable to projects of all sizes.
In which way does it offer the benefits of dynamic typing? The entire point seems to be to abandon dynamic typing, which is fine, but not what that sentence says.
I'm guessing, for example, you can't really do meta-programming with Hack in the way you can with dynamic languages, is that correct?
It depends on what you mean by "with Hack". You cannot do this in Hack code -- we disallow the dynamic features of the language you need to do this; they are impossible to statically typecheck and verify. However, Hack code iteroperates seamlessly with PHP code, so there's nothing stopping you from having some PHP files in your codebase that do anything that standard PHP can do.
So.. my question remains unanswered... if you cannot do meta-programming in hack, how can you say it "offers the best of both dynamically typed and statically typed languages"?
It's more accurate to say that the point is to let you use dynamic typing where that makes sense, and static typing in the many cases where it helps. Hence "best of both".
The benefits of dynamic typing come because you are not forced to convert all your code to the statically typed version. You can still keep some parts synamically typed if you want
> Thus, Hack was born. We believe that it offers the best of both dynamically typed and statically typed languages, and that it will be valuable to projects of all sizes.
In which way does it offer the benefits of dynamic typing? The entire point seems to be to abandon dynamic typing, which is fine, but not what that sentence says.
I'm guessing, for example, you can't really do meta-programming with Hack in the way you can with dynamic languages, is that correct?