3 ms·
Well yes, in theory, but it's generally considered in somewhat bad taste to replace fundamental basics of the language. At that point you're not really writing
by phs2501 9y ago
Well yes, in theory, but it's generally considered in somewhat bad taste to replace fundamental basics of the language. At that point you're not really writing Clojure anymore, it's hard to read other people's code, it's hard for other people to read your code, etc. See the somewhat controversial Allegro CL IF* macro for an example of this (I think that's what it was called; turns out that's really hard to search for).
It's a little different if you're either creating a domain-specific language (at that point you've already made the decision to have a new language, so go nuts) or if you're adding new control structures that you can't have in the base language without excessive boilerplate (see for example the somewhat common AIF macro, which binds its conditional result to a variable). But I'd consider making a new MY-LET macro because I don't like what the built-in LET looked like to be a bit gauche.
Regardless, I just decided to stick with the Lisp dialect that already worked the way I wanted.
- saurik 9y agoUsing an entirely different language because you don't want to use the macro features of the language you are using to modify a small detail due to it feeling "a bit gauche" seems much more extreme to me than just making that change... FWIW, I work with an old-school Lisp/Scheme hacker who learned at MIT and worked with some of "the greats", and he has often argued that if I really wanted Lisp to look like anything I said I liked that day I should have just done that with Lisp as at least then we would be using the same underlying execution engine, and he never seemed to feel it was "a bit gauche".
- tjalfi 9y agoThe source to if* is at (https://franz.com/~jkf/ifstar.txt https://franz.com/~jkf/ifstar.txt).