4 ms·
This is actually true of Lisp and Scheme too, though, since nearly everybody indents their code the same way (how Emacs does it). Code with lots of small functi
by silentbicycle 18y ago
This is actually true of Lisp and Scheme too, though, since nearly everybody indents their code the same way (how Emacs does it). Code with lots of small functions, long and relatively flat imperative code blocks, etc. has very distinctive shapes.
Come to think of it, that's true for most languages that don't have Java-style static typing annotations interspersed throughout. Functional and imperative code in OCaml or Lua code look noticeably different, too, and there's not a whole lot of stylistic overlap between OCaml, Scheme, and Python's syntaxes. (Lua's is relatively similar to Python's.)
- eru 18y agoI believe Haskell looks different. At least with heavy use of combinators my code looks more like Forth than Python. For me small functions tend to be even smaller in Haskell than Python.
- silentbicycle 18y agoAnd do notation retains a lot of the typical "block of imperative code" appearance.
- eru 18y agoYes. Though it has more in common with "strict functional programming with side effects" than traditional imperative code.
- divia 18y agoIt used to be thought that you could judge someone’s character by looking at the shape of his head. Whether or not this is true of people, it is generally true of Lisp programs. from pg's On Lisp