3 ms·
It's kinda of a messy concept. Source code is never like an AST, because an AST is a tree on a computer's memory, with pointers and everything, while source cod
by marcosdumay 6y ago
It's kinda of a messy concept. Source code is never like an AST, because an AST is a tree on a computer's memory, with pointers and everything, while source code is text.
I see no reason why a language can not have a more complex source -> AST transformation, while still keeping code as readable data that can be manipulated by macros. So, if you want homoiconicity with a slightly more complex syntax, I don't think it won't bring any problem.
But if you keep making your language's syntax more and more complex, you will make macro creation harder and harder, so there is probably a practical limitation somewhere. Operators and statement sequences are very likely not complex enough to be a problem, but I don't think anybody will ever make native C++ macros work.