Re:The Brick Wall of C++ Source Code Transformation
by lmm on Thursday November 19, 2015 @10:44AM
(#10595344)
I wonder if the right option is to push the macro-like functionality down into the language itself. Something like http://okmij.org/ftp/Computation/free-monad.html starts to offer very macro-like functionality, but deferred to runtime, so you can still look at the original value and even imbue its effects with a different set of semantics.
Re:The Brick Wall of C++ Source Code Transformation
by amyjess on Thursday November 19, 2015 @11:20AM
(#10595607)
Or something similar to Nim's metaprogramming features. Nim's templates and macros are wonderful.
Re:The Brick Wall of C++ Source Code Transformation
by aconz2 on Thursday November 19, 2015 @03:14PM
(#10597263)
Are Nim's metaprogramming features fundamentally different than C++?
Re:The Brick Wall of C++ Source Code Transformation
by lmm on Thursday November 19, 2015 @11:27AM
(#10595662)
Do Nim macros enforce reversibility? If not, they're no better than C++ ones in this regard.
Everything I read about Nim has the whiff of propaganda; tell me what it does better rather than just telling me it's good.
Two possible directions I see away from macros which would play nicely with source code transformations are un-macros and layers of languages.
Un-macros would take source and display it in the condensed form only for human reading -- this takes away from human writing power of course, which may have to get pushed into the editor. This could also allow for automated pattern discovery.
Layers of languages would look similar to Racket's #lang concept and current macro systems, but without the ability to escape back into the parent language. This creates a new language on top of -- not mixed into -- the parent language.