Thanks for the feedback, Sean!
Every macro introduced adds semantic complexity to the language of code that uses it. It’s something that has to be learned by each new person that encounters it and if it isn’t an official core macro, that person has to figure out where it’s coming from and then go read that library’s documentation (and hope it’s good enough).
Isn’t this always true though? For all new semantics?
->> and transducers have different semantics, hiding that difference in a “very similar”
x>> macro is kind of the worst of all worlds as far as macro usage goes: the “uncanny valley” where the surface similarity leads people to assume one behavior (because
->> is well-known and well-documented) when the actual behavior is different, and subtly so.
What then would differentiate an uncanny macro from a canny one? It’s not as if someone would be using
x>> unintentionally, or by some accident or without knowing what the purpose of
x>> is. It’s utility isn’t really ambiguous either. What subtle differences would we not know about when deciding to transducify a thread-last thread?
And on top of that, you’re proposing making your
x> semantics even more misleading by silently supporting constructs that can’t be changed back to
-> (because you’re giving semantics in the
x world to constructs that are errors in the
For it to be misleading, it would have to be conveying something not true. I think you’re thinking that people will have wrong expectations about how it will behave. I don’t understand why you think that though. The advertised behaviors of the new macros are not exaggerating or making things up. The eagerness semantics of transducers aren’t extremely mysterious. Regarding the new navigational capabilities, there’s not a lot of mystery there either.
Where you started off – with a very simple syntactic transform – wasn’t too bad (although I would never use it in my code and would never let it come in via a PR review either) but you’re way off the deep end at this point, creating a monstrous “kitchen sink” DSL-in-a-macro.
Kitchen-sink!?? It’s a two-line addition, you cantankerous troglodyte!
Again, these are all aesthetic objections, unrelated to technical merits or lacktherof. And I appreciate your aesthetic opinion on it too. But I wouldn’t be making the proposal if I didn’t already disagree with you on all those aesthetic judgements.