After the significant changes between 0.6.4 and 0.7 and up, I have tasked myself the job of creating version independent code. There are several instances where a simple replacement of one macro name with another would suffice. However this appears to be impossible with Julia as far as I can tell.
An important example is the case where the macro @parallel is essentially replaced with @distributed in v0.7. In my versioning logic I can not simply set parallel = distributed; I get an undefined error. Furthermore it appears I can not simply create a new macro of the form,
macro par(args...) :( @distributed $(args...) ) end
It seems that other macros won’t play nice with my renaming, ie
@sync @par ....
does not have the same effect as
@sync @distributed ...
No doubt there are some kind of environment dependencies or escaped variables etc. that are lost in the translation. Is there any way to fix this situation? Can one do a pure textual macro that get’s evaluated and has the same properties as the original macro? The complexity and surprises in the macro system are rather daunting.