I am familiar with this line of reasoning and I have read the Joy of Clojure. I can't say that I agree though. The article you linked is just opinion and doesn't back up its arguments at all.
Afaict, it really boils down to "it's not CL" and "it's not built on cons cells".
I agree that the fact that Clojure sits on top of the Java type system is a bit of a mess but it's a language to get shit done and not satisfy some purists.> "The Joy Of Clojure" which contains 20 line of marketing slogans for 1 line of code
> but I'm not going to perform such a tedious task for free
Well, obviously there's no point in discussing this further and we have to agree to disagree. Have a nice day anyway.
dschiptsov|12 years ago
kragen|12 years ago
But I would argue that this interface is poorly designed, since you can say (cross2 '(a b c) '(1 2 3)) or (cross2 'a '(1 2 3)) but not (cross2 '(a b c) '1), and worse, (cross2 '(a (b c) d) '(1 2 3)) implicitly flattens the (b c) into individual items, which is probably a latent bug rather than desired behavior. So I would argue for writing it in this form instead:
which avoids those irregularities and makes the code easier to understand by removing misleading false symmetries.Except really, if this isn't a homework problem, I think you should write it like this in any of these three Lisps: