4 ms·
= for defun, really? why not set? = really is for equality in lisp, not assignment
by rurban 3y ago
= for defun, really? why not set?
= really is for equality in lisp, not assignment
- stefncb 3y agoWhy is it so strange that someone ignored a convention?
- deleted 3y ago[deleted]
- maleldil 3y agoBecause it's a 50-year old convention, and there doesn't seem to be a compelling reason for ignoring it. The language then uses `is` for equality, including numbers. It's just weird, especially given they're using old-fashioned car/cdr instead of head/tail.
- sph 3y agoThis is not a Lisp, and never claimed to be one. This kind of gatekeeping from ANSI Common Lisp purists is tiring. Who cares about convention when one just wants to build their own language, use S-exprs and car/cdr for the sake of it.
- maleldil 3y ago> Who cares Potential users care. It's off-putting to use something familiar but different in strange ways. Using head/tail versus car/cdr would be a deviation I could understand. This = mess isn't.
- chlorion 3y agoIt's not like common lisps practices are that great anyways. It being an old lisp convention, to me, is actually a reason to not follow it. I want to see a modern take on sexpr based languages instead of being stuck in the past forever.
- hota_mazi 3y ago> Because it's a 50-year old convention That's a terrible reason to justify... well, anything, really.
- nine_k 3y agoIt's not just 50 years old, it's widely conformed to for these 50 years. Why won't you use "&" for "less" and "%" for "greater", instead of sticking to the tired "<" and ">"?
- hota_mazi 3y agoSlavery was widely confirmed for even longer. Tradition, right? How about instead of using tradition to decide if something is beneficial or not, you just assess it on its value?
- mojifwisi 3y ago> Slavery was widely confirmed for even longer. Tradition, right? This is an egregious use of the noncentral fallacy.[1] Conforming to this 50-year tradition makes the language more familiar and easier to learn, so it's reasonable to question why the language chose differently. [1]: https://www.lesswrong.com/posts/yCWPkLi8wJvewPbEp/the-noncentral-fallacy-the-worst-argument-in-the-world https://www.lesswrong.com/posts/yCWPkLi8wJvewPbEp/the-noncen...
- hota_mazi 3y agoAnd yet, Clojure, the most used Lisp today, decided to use brackets instead of parentheses for parameter lists, breaking with 50 years of Lisp tradition. How dare they?? But I'm sure you know better than them.
- nine_k 3y agoWhen Lisp first appeared, square brackets were not even standard characters. Maybe McCarthy would use them if he could. The word "set" is much older, and is universally supported. But most glaringly, (= a b) has a well-understood and entirely different meaning in most lisps, also since 1950s. It's comparison, not assignment. Breaking a well-set convention is a very different thing than making a new, slightly improved convention.
- sph 3y agoThere is no mention of this being a Lisp anywhere in the name or README files. You are mistaken in assuming that, since it has parens, then it must conform to being a Lisp.
- JonChesterfield 3y agoI read (= a b) as unification and slowly pieced together that it was probably assignment. Not as equality as the results of all the expressions starting = were discarded.
- hayley-patton 3y agoAPL, ML and Pascal too. There is a story that Ken Iverson, the inventor of APL, was passing a terminal at which a Fortran programmer had just typed: I = I+1 Ken paused for a moment, muttered “no it doesn’t”, and passed on.