I don't think he was trying to claim that was idiomatic perl. Rather he was saying that clojure is succinct and still very readable.
I don't think he was trying to claim that was idiomatic perl. Rather he was saying that clojure is succinct and still very readable.
I have not written a single line of clojure, and don't know how idiomatic clojure looks like. I tried to translate his example to clojure using my very limited knowledge and looking at the examples on ClojureDocs site:
(sort #(compare (second (re-matches #".*([aeiou]).*" %1)) (second (re-matches #".*([aeiou]).*" %2))) %)
I am sure this is not idiomatic clojure, and probably a very bad way to write. If I cited this as an example of typical clojure code, then I'd be making a totally unfair judgment.The funny thing is, when I just add spaces to the Perl code segment, it looks quite readable to me. But then, I probably know more Perl than him.
sort { ($a =~ /([aeoui])/)[0] cmp ($b =~ /([aeiou])/)[0] } @_And it's a valid argument. There's sometimes a tradeoff between terseness and readability. Of course, readability suffers if the code gets too verbose as well.. go figure.
"Perl is a language where you can choose to be so terse as to be nearly unreadable"
You can actually choose a "level" of succinctness that fits the task at hand and your personal style. This is a very cool feature of Perl that it should be praised for. I agree with GP that the OP intentionally misrepresents it.