3 ms·
Thank you very much for the feedback. I tried to keep the examples simple so that the functionality was clear, I'll try to come up with a more concrete example
by pwmanagerdied 17y ago
Thank you very much for the feedback.
I tried to keep the examples simple so that the functionality was clear, I'll try to come up with a more concrete example to demonstrate it's utility.
I'm aware that you can achieve a a lot of already using classes (and metaclasses), but I thought a clearer syntax would be helpful. I don't seeing my code cluttered with "class" when that's not what's actually happening, but of course that could be exactly what was happening in my example.
One thing I originally had in my example (though I decided it wasn't a good idea so I removed it) was
ui.on_event "click", "altclick":
print("I've been clicked!")
where on_event macro takes the paren-less tuple of event names and returns another macro which takes the block, then does the correct assignment.
I realize this also isn't a strong example, but it's a little bit more than I have in the post.