I know that Nim does not have proper reader macros as most LISPs have, neither String macro as Julia has.
but I could just write a compile-time parser and generate Nim code which will be compiled, am I right?
I found a PEG library for Nim: https://github.com/zevv/npeg
can such mechanism like this NPeg library replace reader macros?
I was programming in scheme until I had to go low-level and realized that I was doing a big mess and that language is not suited for going down in the system.
well, having Nim the same metaprogramming power of lisp/scheme is wonderful as PEGs can replace the reader macros
@Araq , I believe that Npeg library will fulfill all my needs
I haven't heard of string macros in Julia so I looked it up and based on this Nim does have something similar with generalized raw string literals. There is also a metaprogramming tutorial if you're not sure what Nim's macros can do.
Julia has different approach, it uses something called "string macros":
https://duckduckgo.com/?t=ffab&q=julia+string+macros&ia=web
https://stackoverflow.com/questions/26600143/why-do-string-macros-in-julia-use
but I would never choose julia because sucks when doing cross-compilation and has a lot of cons compared to other dynamic languages.
I'll take a look on all of that when I have a spare time, for now I'm still studying the language from the beginning
Ok, sure, good. But beware that your Scheme patterns might not apply in Nim. Just because you need a reader macro in Scheme doesn't mean that you need one in Nim. Nim already comes with a concise syntax, you don't need to hack around it.
I programmed in C/C++ from 1999 to 2005 and I wanna remember that times, I won't do syntax hacks, I'll just use the pure language