4 ms·
This seems similar to Zig (https://ziglang.org/#Compile-time-reflection-and-compile-time-code-execution https://ziglang.org/#Compile-time-reflection-and-compile
by symstym 6y ago
This seems similar to Zig (https://ziglang.org/#Compile-time-reflection-and-compile-time-code-execution https://ziglang.org/#Compile-time-reflection-and-compile-tim...)
- pickdenis 6y agoZig seems to have arbitrary compile-time code evaluation, but not the kind of AST generation you see here[1]. Nim macros seem to be a closer analogue[2]. [1]: https://github.com/seanbaxter/circle/blob/master/gems/rpn.md#lower-the-rpn-ast https://github.com/seanbaxter/circle/blob/master/gems/rpn.md... [2]: https://nim-lang.org/docs/macros.html https://nim-lang.org/docs/macros.html
- logicchains 6y agoThere's ongoing work to add support for generating arbitary types at compile time: https://github.com/ziglang/zig/issues/383 https://github.com/ziglang/zig/issues/383.