Hacker News new | past | comments | ask | show | jobs | submit login
Writing code that writes code with Hack Codegen (facebook.com)
32 points by ctice on Aug 29, 2015 | hide | past | favorite | 4 comments



I would really love to use Hack, but I want to use it in the editor of my choice, not the editor of Facebook's choice.

Because Hack isn't PHP all of the foundations are gone, consider this text from the JetBrains PhpStorm team:

"We’d have to provide full support for a complete new language, which entails implementing a parser, type checker, navigation, completion, inspections, and so on. No part of PHP support that we have now can be reused for Hack, given the fundamental differences between the languages. We’d then have to maintain and enhance it, closely following the evolution of Hacklang."

Until those important issues are resolved, it's unlikely many people will be using these tools. Facebook should, pretty please, consider outsourcing the things in the list above (parser, type checker, inspections anyhow). Unfortunately I can't justify pigeonholing my editor selection for Hack development. Anxiously awaiting some form of resolution.

[1] http://blog.jetbrains.com/phpstorm/2015/06/hack-language-sup...


This all depends on how much support you like to have from your editor. Personally I'm usually happy with just syntax highlighting, which is already covered for me[0]. That said, I haven't had the occasion to really make use of Hack.

[0] https://github.com/hhvm/vim-hack


> outsourcing the things in the list above

Other editor plugins leverage the `hh_*` binaries to achieve this. In fact, the way they are written are specifically for that use-case, as far as I remember.


Considering that had the opportunity to completely customize Hack but stayed rather close to PHP, does anyone else find it weird that they are already trying to move on from the Hack semantics by auto-generating the code?

Wouldn't it have been more effective and easier to debug to put those features in the Hack language (which is a pretty recent invention as languages are concerned) itself without resorting to external tools?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: