|
|
|
|
|
by baranul
417 days ago
|
|
Comptime is often pushed as being something extraordinarily special, when it's not. Many other languages have similar. Jai, Vlang, Dlang, etc... What could be argued, is if Zig's version of it is comparatively better, but that is a very difficult argument to make. Not only in terms of how different languages are used, but something like an overall comparison of features looks to be needed in order to make any kind of convincing case, beyond hyping a particular feature. |
|
> My understanding is that Jai, for example, doesn’t do this, and runs comptime code on the host.
> Many powerful compile-time meta programming systems work by allowing you to inject arbitrary strings into compilation, sort of like #include whose argument is a shell-script that generates the text to include dynamically. For example, D mixins work that way:
> And Rust macros, while technically producing a token-tree rather than a string, are more or less the same