Hacker News new | past | comments | ask | show | jobs | submit login

I suspect a big reason is that you need an interpreter in addition to the compiler. From what I understand, the D gods spent quite some time and effort developing theirs.

For interpreted languages, there are no excuses; hooking into the interpreter at compile time is trivial. Full macros [0] are nice, but depends a lot on the syntax. A way to evaluate expressions at compile time [1] would go a long way.

[0] https://github.com/codr7/gfoo#macros

[1] https://github.com/codr7/gfoo#bindings




If you do not want to implement a separate interpreter you can do multiple compilation passes instead.


True, but in the cross-compilation case, you then need to do fun stuff like compile anything invoked at compile time for the host arch as well as the target.




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

Search: