3 ms·
Caveat: lots of subjectivity here. My impression is that Go and Lisp are similar here. Neither is particularly pleasant to read in the small. Lisp because of a
by munificent 14y ago
Caveat: lots of subjectivity here.
My impression is that Go and Lisp are similar here. Neither is particularly pleasant to read in the small. Lisp because of all of the parens and the sometimes "backwards" dataflow of nested functions. Go because of the "imperativeness", the frequent manual returns for errors, the mandatory {} for blocks.
In both cases, that was a deliberate choice in order to get simple syntax. The beauty they are focused on is larger-scale beautiful semantics. Lisp with macros, first-class functions, etc. Go with interfaces, goroutines, and channels.
Where some languages treat the syntax as a first-class feature, I think Go and Lisp treat it more as a means to an end. That being said, in both cases, practitioners of those languages do specifically like their syntaxes. It's just not a major focus of the language designers' time.
- bitops 14y ago> Lisp because of all of the parens and the sometimes "backwards" dataflow of nested functions. I've come to believe that the second part of this statement really is the primary reason why Lisp drives some people absolutely nuts. The parens are really just a distraction and "easy" justification for not liking the language. It makes sense, though. When you have to read both "outside in" and "bottom up", a lot of your acquired reading abilities (left to right, top to bottom) are in tension with the code you're trying to understand. At least in Clojure, the ->> family of operators ("threading" macros) are doing a good job helping to alleviate this. Maybe they're available in other Lisps, I don't know. EDIT: found a reference to these macros in Emacs Lisp: http://emacswiki.org/emacs/ThreadMacroFromClojure http://emacswiki.org/emacs/ThreadMacroFromClojure
- munificent 14y ago> I've come to believe that the second part of this statement really is the primary reason why Lisp drives some people absolutely nuts. Agreed. This is a major reason why Lisps read wrong to me and is one of my favorite things about conventional subject.verb(object) syntax in OOP languages. My own language[1] has Lisp-like semantics where methods are lexically-scoped and not attached to classes but retains something close to OOP syntax because I think that's such a readability win. For me, this is the best of both worlds. [1] http://magpie-lang.org/multimethods.html http://magpie-lang.org/multimethods.html