3 ms·
Your comment implies that you’re only familiar with C-style curly brace languages. ClojureScript is a Lisp language. If you’ve never learned one, I highly rec
by wffurr 5y ago
Your comment implies that you’re only familiar with C-style curly brace languages.
ClojureScript is a Lisp language. If you’ve never learned one, I highly recommend it. It will make you think about programming differently.
As esr puts it in his (in)famous “How To Become A Hacker”:
“LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot.”
http://www.catb.org/~esr/faqs/hacker-howto.html#skills1 http://www.catb.org/~esr/faqs/hacker-howto.html#skills1
For myself, I learned Scheme (another Lisp-like language) in graduate school through the How to Design Programs curriculum (http://htdp.org/ http://htdp.org/), which despite already being a professional programmer, I found enlightening. And then again in the online programming languages course from Brown: https://cs.brown.edu/courses/cs173/ https://cs.brown.edu/courses/cs173/.
- toastal 5y agoLISP is super easy for humans and machines to parse which makes it readable and I'd be hard-pressed to call it ugly for that reason--I think it's pretty darn easy to read having fairly small exposure to LISPs. I personally prefer ML-family syntax and never liked the ergonomics of working with parentheses, especially in Vim, but I agree the parent comment reeks of exposure bias making claims about what others know and should feel comfortable with.
- thiht 5y ago> LISP is super easy for humans and machines to parse You have to choose 1, it’s either easy to parse for machines or for humans, not both. Any kind of lisp is harder to parse for humans.
- kazinator 5y agoProgramming languages in which line breaks and indentation are not significant are hard to parse for humans, period. Take any Javascript or C program, and remove the line breaks so that it's just a linear string of tokens. It's no harder for the parse for the machine. Much harder for you. Humans parse non-trivial examples of Lisp using indentation clues that the machine ignores, just like in the case of a large number of language families. Not all structure in programs is indicated with indentation; sufficiently small chunks of programs are written on one line. The structure of those chunks is easy for humans to understand accurately if they are written in Lisp because there is no ambiguity. Lisp syntax also has a way to break any expression, no matter how small, into multiple lines with indentation. Any two Lisp programmers will do it the same way: (+ (* x x) (/ y z)) there are no questions like "do I put the slash at the end of the previous line"? If you can't understand some one-line chunk of code, you can get it into a canonical indented form, and this can be automated.
- tomlin 5y agoIf it's so easy, why are none of the early code learning platforms employing Lisp or Clojure? An honest answer is that it's too hard to read for children who are learning. It's not easy, saying it is doesn't make it so. Ask a kid if it's easy.
- wffurr 5y agoHtDP uses Racket and scales from graduate school to middle school children. Part of the reason they use Racket Scheme is that it is extremely easy to teach the syntax. As for why it's not used more widely, same reasons Lisp like languages aren't used more often in industry: inertia, fear, worse-is-better syndrome.
- toastal 5y agoScheme was literally one of the OG languages to teach to beginners. As an English speaker, I've nested parentheses is normal writing, so it shouldn't be a foreign concept.
- IgorPartola 5y agoI have been writing code for several decades. Never managed to learn LISP due to a parentheses embargo with Naboo.