3 ms·
> Compile time IO doesn't make much sense either. While I agree with D's decision here, there are other languages which do allow anything at compile time. See
by steveklabnik 10y ago
> Compile time IO doesn't make much sense either.
While I agree with D's decision here, there are other languages which do allow anything at compile time. See Jai, for example.
- wtetzner 10y agoAnd Common Lisp, and Scheme, and Elixir, and Clojure, and I'm sure I'm missing a bunch :)
- p0nce 10y agoThose come with the whole compiler at runtime.
- lomnakkus 10y agoEven... Haskell! Dundundun! (I'm referring to Template Haskell.) As it turns out (IME) referencing arbitrary data (such as a database schema queried from a 'live' database) is actually of quite limited value. Where I actually agree that it makes sense is the 'read-a-checked-in-file-and-generate-code-at-compile-time-from-that'. Otherwise, you're mostly just looking at a lot of pain compared to just generating code (that you might check in).