Re:Why does Lisp use cons cells? (1998)
by pfdietz on Friday October 04, 2024 @07:58AM
(#41740482)
It would be trivial to replace car and cdr in your code with any other symbol names you like. Even the Common Lisp standard supplies alternatives (first, rest). If this was not done, it was because people using lisp didn't see any great value in doing it.
[ Parent
| on HN ]
Your point and the grandparent's point are not contradictory. 'car' and 'cdr' can be opaque pieces of jargon that make the language slightly but noticeably more difficult for new learners, and they also can be standard pieces of jargon that current users would find no value in changing.
In that way, it's a bit like indentation in Python.
I think this illustrates that perceived shallow blemishes that upset newbies have nothing to do with success or failure of a programming language. Another example here is "all those parentheses", and perhaps even lack of static typing.
Re:Why does Lisp use cons cells? (1998)
by kerkeslager on Friday October 04, 2024 @10:24PM
(#41747271)
It's a shallow blemish yes. I wouldn't say is has nothing to do with the success or failure--but as I said in my post, it kind of doesn't matter much.
The problem I have here is this total unwillingness to admit that it is a blemish. Like because Common Lisp did it, it can't be wrong, so we have to come up with bizarre justifications for this like pretending some ancient hardware architecture is better than today's "braindamaged" CPUs.
Re:Why does Lisp use cons cells? (1998)
by pfdietz on Saturday October 05, 2024 @06:46AM
(#41748961)
I don't think anyway says it isn't a blemish. The point being made is that it's a trivial, irrelevant, and unimportant blemish.
Re:Why does Lisp use cons cells? (1998)
by kerkeslager on Saturday October 05, 2024 @08:40PM
(#41753877)
The way Naggum presents it, it's as if it is not only not a blemish, but a work of genius.
If I wanted to nitpick, I'll point out that I used "says", not "said". In the present tense, Naggum can no longer say anything at all. :/
I would say that it's more like the `def` keyword in Python. People learn that it's short for "define" - but that doesn't make much sense given that other kinds of things can perfectly well be "defined". It also leads to beginners expressing themselves weirdly - I've read things like "so I have a defined function like so:" countless times.
Re:Why does Lisp use cons cells? (1998)
by theonemind on Friday October 04, 2024 @05:03PM
(#41745560)
What do you find strange about someone saying they defined a function?
Just curious. I can't find anything strange about the wording or conceptual understanding likely behind such a statement.