4 ms·
What makes people see Lisp-like languages and think to themselves "yep, this is how I want my code to look like" is beyond me
by brap 4y ago
What makes people see Lisp-like languages and think to themselves "yep, this is how I want my code to look like" is beyond me
- tmtvl 4y agoI like the structure that S-expressions convey. Must be something with how my brain works. It's probably also why I find Python code utterly unreadable.
- brap 4y agoTo each their own. There are obviously very smart people choosing Lisp so I’m not trying to knock it down or anything, I just never got the appeal Every now and then I try to check out a Lisp project and this is my reaction the moment I see the code: https://giphy.com/gifs/seinfeld-bye-jerry-106PwpLIIXJnXi https://giphy.com/gifs/seinfeld-bye-jerry-106PwpLIIXJnXi
- vindarel 4y agoThis is what we see: https://raw.githubusercontent.com/tarsius/paren-face/master/parentheses.png https://raw.githubusercontent.com/tarsius/paren-face/master/... Don't look at the parens and don't stop at the superficial look :]
- dgb23 4y agoFor me much of the appeal of the syntax comes from using it with a editor integrated REPL, or when writing macros, or when generating linter configuration from a domain model etc. However I agree with you on some level. Lisp code can easily be written in a way that’s hard to read. Specifically because of nesting expression way more often than is comfortable for me to read. I much rather prefer let bindings and threading so most of the code reads from left to right.
- rawoke083600 4y ago>To each their own. There are obviously very smart people choosing Lisp so I’m not trying to knock it down or anything, I just never got the appeal Just know that almost no one STARTS off by liking Lisp-Syntax, but oh boy does it grow on you.
- michaelteter 4y agoIn most cases, an imperative example in a curly-bracket language (JavaScript as one example) has the same number of parens and curly brackets as a Lisp has in parens. They're just in different places. And, the non-Lisp languages tend to have more rat droppings => , ; . etc. f is a function which takes two arguments, adds them, and returns the result. Clojure: (def my-var ["hello" 123 (f 10 20)]) -> my-var: ["hello" 123 30] ([""()]) -> 8 noisy characters JavaScript: const my_var = ["hello", 123, f(10, 20)]; -> myVar: ["hello", 123, 30] =["",,(,)]; -> 11 noisy characters Obviously this difference becomes more pronounced with longer argument lists or array element counts.
- Lyngbakr 4y agoI totally agree with this, but my love of Lisps wasn't instantaneous. When it clicked though — which required some effort — and I could appreciate the elegance of the language, I didn't want to use anything else. Regarding Python, I've always disliked its functional whitespace and OO inclination. Given its popularity, though, I'm clearly a minority! TL;DR — to each their own.
- michaelteter 4y agoFor me, S-expressions remove a whole layer of stuff to think about and remember. It normalizes everything. And you get the bonus of being able to construct or parse code from within code, since the structure is so uniform and flat.
- capableweb 4y agoWe (professional developers using lisp-like languages daily) don't have the reaction of "ewww" as soon as we see something foreign, but instead we think "hmm, that looks different, I wonder why it looks different?" and then we start to try to understand it. Then you give a lisp-like language a try (Clojure in my case) and suddenly it's really hard to program in any other language, because they're not as good as a lisp language. If you have a knee-jerk reaction to everything that looks different, you'll lose out on lots of fun stuff. You should give lisp a try, I'm sure you won't regret it.
- beepbooptheory 4y agoLispey stuff self-selects its fans quite nicely in this way.
- simula67 4y agoBut is there any need to make things different for the sake of difference? For example, why not name "car" function as "first", "head" or "beginning"? Why not name "cdr" as "rest", "tail", "end" or "back"?
- Skinney 4y agoLISP was one of the very first high order programming languages (came around the same time as FORTRAN). If anything, other languages are different for the sake of being different. Btw, Clojure makes those exact changes you mention (first instead of car etc.)
- kazinator 4y agoCAR and CDR have origins in a hardware feature of the IBM 704. But they came into Lisp via Fortran. The list processing in Lisp was closely inspired by FLPL: the Fortran List Programming Language: a system for linked list manipulation done in Fortran. FLPL had functions like XCARF and XCDRF and others. MacCarthy greatly improved the naming by dropping the gratuitous X...F noise. (What had they been thinking?)
- 4y ago
- yogthos 4y agoWhat makes people see non-Lisp-like languages and think to themselves "yep, this is how I want my code to look like" is beyond me
- chitowneats 4y ago[flagged]
- rawoke083600 4y agoWhat I noticed is, that in the beginning most people (including me) think like this. It's like ()-SOUP ! Then suddenly after a month or so you suddenly realise wow, this is actually nice and useful and now all other non S-Exp feels jukky. You get to that point NOT because you are now simply enduring/accepting that it looks ugly but it really after a while becomes pretty ! It's like picking up smoking, no one likes the first or two cigarettes at first, it taste like sht, yet if you keep doing it becomes lovely. * PS. Don't smoke kids !
- blatant303 4y ago"Syntactic sugar causes cancer of the semicolon." Alan Perlis
- michaelteter 4y agoThere are many incredible foods that we cannot imagine putting in our mouth as children, but usually we grow up and discover how wonderful they are.
- butternoodle 4y agoTo each their own! I feel the same way about Algol family languages, too many arbitrary design decisions that have been internalised for decades at this point for my liking.