4 ms·
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 developi
by codr7 6y ago
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 https://github.com/codr7/gfoo#macros
[1] https://github.com/codr7/gfoo#bindings https://github.com/codr7/gfoo#bindings
- dependenttypes 6y agoIf you do not want to implement a separate interpreter you can do multiple compilation passes instead.
- mikepurvis 6y agoTrue, 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.