Open hasezoey opened 11 months ago
Thanks for creating this -- I like the idea of using quote as it's closer to rust code, but I'm afraid it'll be harder for newcomers to come in and contribute as they'll have to understand quote's intricacies instead of just manipulating strings. That being said, it'll be one step closer to always producing correct code.
At the same time, Tera is quite heavy for something as simple as doing codegen, so I'm with you there.
but I'm afraid it'll be harder for newcomers to come in and contribute as they'll have to understand quote's intricacies instead of just manipulating strings.
as a counter point: we are already using quote / syn (not its macros though) to parse the input file, so we have to already deal with a little quote stuff and personally, i have not used quotes macros before, but its syntax looks really simple (if you know rust code)
Although we're using quote/syn to parse rust code, it can be confusing for newcomers, especially the 'repetition' syntax. I don't mind giving it a shot though! We can revert if necessary :-)
Currently code generation is basically done by string concatenation, which is "good enough" but could be improved, current suggestions are:
tera
(https://github.com/Wulf/dsync/pull/89#issuecomment-1783916991)quote
+prettyplease