Hey guys,
Can someone help clarify the typed vs untyped return types for macros and the use cases?
I've been using macros just fine but I feel like I don't have a real grasp on the differences and when to use either. Sometimes I change the return type to see what happens nothing breaks.
I understand param types, I'm referring to the return types:
macro test(param :untyped) :untyped =
vs
macro test(param :untyped) :typed =
This should help explain the difference.
it doesn't; that's for params, not return type.
I've discussed this previously here: template/macro should return `void` instead of `typed` (synonym and much clearer) - Nim forum
looks like the spec is still unclear about it as mentioned here https://forum.nim-lang.org/t/4037#25128