4 ms·
It's funny this came from SICP's authors because I always found that Lisp was harder to read/write than languages like Python which look like English. I'm not
by St-Clock 15y ago
It's funny this came from SICP's authors because I always found that Lisp was harder to read/write than languages like Python which look like English.
I'm not saying one is better or that one is easier to maintain than the other, just that Python is really close to the pseudo-code, design notes, and specifications in English that I write. Not just logically, but syntactically.
In Java, I used to write some pseudo code in comments before attacking a particularly difficult method. I rarely do this in Python now.
Still Lisp can be closer to English than some Perl one liners :-)
- Peaker 15y agoPython is close to the way you think, because the tools you use shape the way you think. I write my pseudo-code in a Haskell these days. Also, closeness to English does not help readability of programs. Programs are pretty close to abstract maths, so closeness to maths actually helps readability of a lot of the expressed concepts (e.g: Even Python uses mathematical notation for its arithmetic).
- St-Clock 15y ago"Programs are pretty close to abstract maths" For you and many people, yes. For me and many other people, no. I sometimes write math when I program, but more often, I manage. I assign roles and responsibilities. I orchestrate communications. I try to keep conflicts to a minimum. I often automate the way I think and I rarely think mathematically (that's how I wrote my Master's thesis and this is how I'm writing my Ph.D. thesis. I mean, the programs behind the theses). "because the tools you use shape the way you think." Yes... When you are starting to program or when you haven't been seriously exposed to other programming languages and paradigms, you are right. But I think I've been exposed to enough of these and made a conscious decision. For example, to me, prolog was immediately natural during my bachelor degree, but haskell felt more constrained. Still, if I was primarily writing code in Lisp or haskell, I hope my pseudocode would be different. Otherwise, it would be quite a waste of time translating imperative programming to functional programming.
- groovy2shoes 15y agoThey're not talking about Lisp in particular. They mean that programming languages are a formal way to express computation. The formality of the languages happens to make them suited for machine use.