Money quote for the non-lisper: > For simplicity, let’s use the notation Yes, let's! Except in lisp, you can't. ;) (Yes, feeling snarky.)
Except you can, just use reader macros.
Lisp has too many parentheses...
51–60 of 81 posts
Re: Lisp has too many parentheses...
#52Gaaah, knock off the CAPSLOCK and the machismo, please. Also, you don't need to invent backcronyms for CAR/CDR, they're now called first/rest. Having said that, I really like the presentation of your blog, nice typography. And after skimming your book[1] in progress, and noting your obvious theoretical bent and taste for rigor, I can only anticipate to read more of your future posts (latch on to something "obscure" l…
So when you call them first and rest, how do you destructure lists of lists? Actually, now that I think about it, "fire" is much cooler sounding than "cadr". But not as cool sounding as cadadr.
(def coll [[1 2 3]
[4 5 6]
[7 8 9]])
(second (second coll)) ; => 5
And often when I'm digging deep inside a nested data structure, I don't need just one piece of data, so destructuring comes in handy: (let [[[top-left]
[_ middle]
[_ _ bottom-right]] coll]
[top-left middle bottom-right]) ; => [1 5 9]Re: Lisp has too many parentheses...
#53Re: Lisp has too many parentheses...
#54Earlier quoted context omitted.
You both have stupid arguments which basically boil down to "I don't like it because I prefer it the other way." This stupid flamewar has been fought countless times on countless online forums, let's not do this.
No... my argument is: "requiring lisp programmers to pay attemtion to formatting when they haven't had to do so for years, just to make some python developers feel more at home, is stupid." Mandating whitespace complicates the situation, and for what benifit? You're the one proposing a dramatic change, show some dramatic evidence to back up your proposition.
What did you not understand by "let's not do this?"
Re: Lisp has too many parentheses...
#55Anyone manage to build a Lisp that used semantic indentation (like Python)? You could make it optional and just have it function as a preprocessor that generates the real thing.
Perhaps Haskell can be an inspiration?
Re: Lisp has too many parentheses...
#56I always liked the way Larry Wall put it: "Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in." http://groups.google.com/group/comp.lang.lisp/msg/7700fb02a2...
Re: Lisp has too many parentheses...
#57Gaaah, knock off the CAPSLOCK and the machismo, please. Also, you don't need to invent backcronyms for CAR/CDR, they're now called first/rest. Having said that, I really like the presentation of your blog, nice typography. And after skimming your book[1] in progress, and noting your obvious theoretical bent and taste for rigor, I can only anticipate to read more of your future posts (latch on to something "obscure" l…
The bigger problem is that CAR and CDR actually mean something without the silly anatomy analogies.
Re: Lisp has too many parentheses...
#58Earlier quoted context omitted.
Maybe im to inexperienced with classic lisps, or maybe im just spoiled by clojure, but i have no idea what cadadr means, is it the rest of the first, of the rest of the first, or the other way around?
For things like cadadr, I just chop off the "c" and "r", and use the middle part to figure out the sequence of car and cdr calls. (cADADr x) = (cAr (cDr (cAr (cDr x)))), which would be (first (rest (first (rest x)))) in Clojure.
In Clojure it's usually more idiomatic to use destructuring, which I think is much more understandable since the form follows the structure that is being accessed.
Or you can use get-in, which takes a sequence of keys to dig into a deep associative data structure. It doesn't work with sequences, but building highly nested seqs is rather uncommon in Clojure.
Re: Lisp has too many parentheses...
#59Anyone manage to build a Lisp that used semantic indentation (like Python)? You could make it optional and just have it function as a preprocessor that generates the real thing.
I find this amusing because I've always found "lisp has too many parenthesis" and "python has too much significant whitespace" to be roughly equivalent in terms of relevance.
Re: Lisp has too many parentheses...
#60Anyone manage to build a Lisp that used semantic indentation (like Python)? You could make it optional and just have it function as a preprocessor that generates the real thing.
I think it's a terrible idea, but there you go.