5 ms·
AFAIK large PHP libraries(Doctrine/Symfony) generate PHP code (from config files for instance) that is then required and executed. You cant be more meta than t
by camus2 13y ago
AFAIK large PHP libraries(Doctrine/Symfony) generate PHP code (from config files for instance) that is then required and executed.
You cant be more meta than that.
I dont know if you can do that with Hack, but that's definetly a big PHP pattern.
- jwatzman 13y agoIt 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.
- Touche 13y agoSo.. 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"?