2 ms·
That was a great read! I always love seeing people writing DSLs in Julia, even if it’s just for fun. Was there anything that you found to be surprisingly chall
by eigenspace 8y ago
That was a great read! I always love seeing people writing DSLs in Julia, even if it’s just for fun.
Was there anything that you found to be surprisingly challenging, or was it mostly straightforward?
- nathandaly 8y agoThanks! I think most of the challenge was self-inflicted.. I just sort of programmed as I went, with no planning at all, and so i wound up reimplementing the same concept a few different ways, which made smooshing it all together into the mega SELECT function difficult. I also was surprised by some of the aspects of writing the macros. It wasn't really clear to me when pieces of the expression get passed in as separate arguments, vs when they come in as a nested structure. That is, does `@SELECT foo @FROM bar @WHERE a>2` parse as a call to `SELECT(:foo, :@FROM, :bar, :@WHERE, :(a>2))`, or as `SELECT(:foo, :(@FROM(:bar, :@WHERE(:(a>2))))`? I think it was the second one, but I still don't think I really have a good grasp on the pattern.