@aedt Don't get me wrong, Andrei Alexandrescu and Walter Bright are on my list
of the smartest people and are there to stay. Some time ago I considered D to
be the best language ever. But you know, opinions may change over time =)
Nim also has CTFE, but it is more powerful, because it allows to run other
processes, and FS access. Also Nim's CTFE is a register VM, while in D it is an
interpreter. Theoretically this makes Nim CTFE faster, but surely it's just an
implementation detail that may change eventually.
Nim's macro system is so powerful, that you can implement D string mixins in it
like so:
import macros
macro stringMixinLikeInD(s: static[string]): untyped = parseStmt(s) # This
is the implementation of string mixins. Period.
const myNimCode = """
echo "hello world"
"""
stringMixinLikeInD(myNimCode)
But you're not likely to do such things in Nim, because macros are smarter than
that. When you get the hang of Nim you will start asking questions why in D
statically computed values are called enums =). I know, it's C++ legacy, but
just think of it. In Nim those are consts, just like it should be.