Hi. Does Nim supports anything like a "dynamic packges loading"? For example, I
have 3 packages:
pack0.nim (root package) contains:
var dstBack = 0 # some variable-indetifier (will indicate, from wich
poackage someProc will be called)
macro init*(back:int) = # some initialization macros, who sets variables
value before "someProc" called
dstBack = back
value
macro someProc*(a:int) = # some macros, who will return "someProc" from
destination package (in choice of "dstBack")
case: dstBack
of 0: pack1.someProc
of 1: pack2.someProc
else: proc (a:int) = discard
pack1.nim:
proc someProc*(a:int): int =
result a += 1
pack2.nim:
proc someProc*(a:int): int =
result a -= 1
Is it possible to realize this scheme in Nim? Thanks.