of course we can do a lot without any macros, but ...
# language-proposals
r
of course we can do a lot without any macros, but also we can do a lot without inline functions 😉
e
There is a huge different between inline function and macros. Toolability that is. Inline functions let you solve many issues without introducing toolability problems
r
What toolability problems introducing macros? Inline function body is inserted in body of another functions, with macros is almost the same, AST is inserted in body of other functions
d
Because there's little to no reason for having macros that just reuse code by copying ASTs. There are existing language abstractions for that - plain old functions, for example. Why exactly it has to be a macro is still unclear.
r
AST can be generated by libraries
d
Sure. And again, why? There are some problems that are usually solved with macros, but for some strange reason we didn't touch any of them yet 🙂
Hint: metaprogramming.
r
And again, why?
for better performance and less memory allocations
d
If you have a performance problem and want to solve it with macros... you are in a rather deep trouble 🙂
👍 2
p
Please, please do not add macros. Keep the language simple and the code readable.
👍 2