@guibar Thank you, guibar, I forgot I need a static[T] to change macros'
semantics. I haven't used that for some time now.
@Udiknedormin Here you can use `static` types that passes data to macros
instead of a `NimNode`
import macros
const module {.strdefine.}: string = "math"
macro importconst(name: static[string]): untyped =
#let value = name.symbol.getImpl
#echo "variable
@Araq How can I do it with macros? getImpl returns the const's default value,
not the strdefined one:
import macros
const module {.strdefine.}: string = "math"
macro importconst(name: string): untyped =
let value = name.symbol.getImpl
echo "variable nam
That's why I like nim! Got a reply on my questions in 5 minutes from Araq!
Thank you
1. `import "/tmp/math_superfast"` (with the quotes) works.
2. You can use a macro for that, yes.
3. Certainly.
4. register at gravatar