5 ms·
I don't really mind the parens, but the whole attitude feels indicative of a problem. Like - it's 2018 and people are still using 'cdr' and 'cons' as terminolog
by ajkjk 9y ago
I don't really mind the parens, but the whole attitude feels indicative of a problem. Like - it's 2018 and people are still using 'cdr' and 'cons' as terminology and happily expecting other people to learn those words and not even feeling bad about it.
If the person justifying Lisp doesn't mind that the word 'cons' is terrible, why should I trust their aesthetic sense about anything? If I have to have "miserable notations" to get "coding nirvana", and coding nirvana is so great, why not fix the notations? do you just think everyone should have to struggle because you did?
I guess it feels like trying to determine which of these statements are true:
(1) "Lisp is coding nirvana"
(2) "Lisp is weird regressive nostalgia for a simpler era where nothing was typed and everyone used Emacs and memorized arcane terminology and shared macros on Usenet", and there are way too many signs that it's a lot of (2).
[edited to be less abrasive]
- bluefox 9y agoI read: whyknow thing like word"and"sentence to write and plural and capitalization comma dot semicolon space question mark need write spaces between them wordamabobs why don't fix notation???
- ajkjk 9y agoI don't see your point. Do you disagree that things can be named badly?
- bluefox 9y agoPoint is: Lispers obviously don't care about what you care about. That is why they don't fix it: it's not broken for them.
- ajkjk 9y agoIf someone evangelizes something and doesn't see and doesn't apologize for obvious flaws ("I promise this is worth it even though it's obviously flawed!), that makes me seriously doubt their reasons for preferring it or their ability to empathize with other people. At risk of being offensive: yes, it's clear that Lispers don't care, but that makes me think they're masochistic or autistic, not that I should use their favorite language.
- bunderbunder 9y agoIt's not like that everywhere in the lispverse. I was overjoyed when Racket offered functions like 'first', 'rest', and 'second' to use in place of 'car', 'cdr' and 'cadr'. (Though it still retains the gross names, for backward compatibility.) Clojure does similar, with a hefty dose of additional pragmatism. TBH, though, as someone who used to love Scheme (and has yet to spend any real time with Clojure), I agree that there's a hefty amount of nostalgia involved. 2 or 3 decades ago, lisp felt like a total sea change compared to what else was out there, which was mostly just a bunch of C and BASIC dialects. Nowadays even the C dialects have adopted most of what made lisp feel great, and I just don't feel that great a need to go back to living a world where (almost) everything is a linked list.
- felideon 9y ago> Like - it's 2018 and people are still using 'cdr' and 'cons' as terminology and happily expecting other people to learn those words and not even feeling bad about it. Oh please, cry me a river. Like monads, promises, or props are any better. > If the person justifying Lisp doesn't mind that the word 'cons' is terrible, why should I trust their aesthetic sense about anything? If I have to have "miserable notations" to get "coding nirvana", and coding nirvana is so great, why not fix the notations? do you just think everyone should have to struggle because you did? Your ignorance is baffling. The notation is a feature, not a bug. If you want the feature, then yes, you will have to struggle. While cons and cdr as concepts are necessary to learning what goes underneath the hood, idiomatic lisp is rarely written in terms of cons and cdr.
- deleted 9y ago[deleted]
- ajkjk 9y agoI know that. My point is that the antiquated terminology's survival seems to be a symptom of a culture that values the wrong things: like pointless historical names instead of clear modernized ones. (Monads and props are definitely not better. You won't find me defending them! 'Promise' is a much better name, though.)
- lispm 9y agoFIRST and REST as names for list operations have been added 40 years ago. Pattern destructuring and list templates are as old. Naming is important, but the core Lisp names can be learned in a day.
- mikegerwitz 9y agoConventions exist in every language. `car', `cons', and `cdr' are also part of certain standards (e.g. RnRS). And, honestly, they compose a bit better than `first', and `rest' for combinations like `caddr' and `caaddr'. I suspect that you're going to be even more unhappy with those constructions. The same can be said about older languages like C, which also have standardized notations. Why fix what isn't broken?
- ajkjk 9y agoBecause it is broken. It's not broken if you've already learned it and internalized the terminology; it's broken for everyone else because it's needlessly difficult to learn (and actively dissuades people from wanting to learn it, hence all the articles evangelizing Lisp).
- lispm 9y agoOld communties have old words. Check some UNIX command names sometimes. C doesn't rename its operators either. Renaming stuff every few years dosn't make it easier to learn.
- craigsmansion 9y agoBy that rationale every foreign language is broken, and, maybe more pointedly, every language but Chinese (or possibly Spanish) is broken and needlessly difficult to learn.
- benlorenzetti 9y agoThe trend of history since babel seems to be going in this direction. If there is eventually a universal common tongue this rational will be proven right.
- dmitriid 9y ago> for combinations like `caddr' and `caaddr' Right...because `caddr' and `caaddr' are good because??? And when is the last time you consciously used any of those primitives?
- sedachv 9y ago> Like - it's 2018 and people are still using 'cdr' and 'cons' as terminology and happily expecting other people to learn those words Ok, so what do you think are better names for those operators and why would they be better?
- ajkjk 9y ago'first' and 'rest' for 'car' and 'cdr' are obviously better, because they say what's going on, and that's why some people are already using them. I'm not sure if there's a good term that's not already used for 'cons'. Maybe 'Join' or something. Do I even need to justify why these are better names? The problem is not that people don't know about better names. Everyone does [0]. My issue is that this doesn't seem to bother people. [0]: https://www.gnu.org/software/emacs/manual/html_node/eintr/Strange-Names.html https://www.gnu.org/software/emacs/manual/html_node/eintr/St...
- lispm 9y agoThe problem is that FIRST and REST doesn't cover the whole idea of cons cells. That's why the old names still exist. The Lisp practice for 40 years is to use FIRST, REST, LIST, APPEND, LIST*, ... when we speak about List Processing. CONS, CAR and CDR are used when cons cells are used for things like trees, graphs and other data structures. It's an indicator that the code is very low-level and used for assembling other data structures from cons cells.
- sedachv 9y ago> 'first' and 'rest' for 'car' and 'cdr' are obviously better, because they say what's going on I sometimes use cons cells for binary trees - first and rest are misleading in that case. I very often use cons cells to define things - the car is some object and the cdr is some property or definition that applies to the object. first and rest are misleading for that use case. What you are proposing is to use domain-specific names for operations on an abstract data structure. Any names with pre-existing meaning will become misleading as soon as the data structure is applied to a different application. Coming up with new terminology to unambiguously refer to new technical concepts is not a "problem," it is a means of effective communication.
- outworlder 9y ago> If the person justifying Lisp doesn't mind that the word 'cons' is terrible, why should I trust their aesthetic sense about anything? This is not about aesthetics, unless you are arguing that the symbols should be replaced by square brackets or emoji. And this has been tried before. S-Expressions are not the only way to express lisp. There are M-Expressions and many other notations. Even significant whitespace has been tried. And yet people keep coming back to parentheses. Don't you think there is a reason for that? Also: almost all other languages use the exact same convention for lists that Lisp uses (except they tend to use square brackets as their symbol).
- didibus 9y agohttp://clochure.org/ http://clochure.org/
- jimbokun 9y ago"Like - it's 2018 and people are still using 'cdr' and 'cons'" Like they're really not. "first" and "rest" work just as well as car and cdr. https://stackoverflow.com/questions/29907440/difference-between-cdr-car-and-rest-first-and-possible-implementation https://stackoverflow.com/questions/29907440/difference-betw... "[edited to be less abrasive]" Keep editing.
- ajkjk 9y ago"Keep editing" It's tricky online to find the right place in between "having opinions" and "never contributing". I have opinions about the Lisp world that aren't that nice but weren't represented in the comment section, so I wanted to throw them in. The opinions are dismissive, so they had to sound a bit dismissive. My first pass was overly dismissive so I edited it but I don't think I want to go more "o please teach me!" than I did because then I'm lying about how I (and I think other people!) feel. Which is, basically, frustrated.
- astine 9y agoI think that there is a utility to the odd names. 'cons' is really just a pair while 'car' and 'cdr' are just the first and second member of that pair respectively, but this pair is a specific kind of pair for a specific kind of purpose so it makes sense to have a special jargon for it. It makes sense not to pollute the global namespace by reserving such common words and it helps to know immediately that one is talking about specifics of the Lisp list implementation. I suppose that some might prefer to not have to worry about the specifics of Lisp list implementation at all (Clojure manages this pretty well), but I think that having that kind or relatively low-level access has its uses. (All things considered, I don't think that 'for' or 'switch' are any clearer, anyway.)