4 ms·
No, it is not really. To adapt a related note http://www.hxa.name/notes/note-hxa7241-20101218T2158Z.html http://www.hxa.name/notes/note-hxa7241-20101218T2158Z.h
by hxa7241 15y ago
No, it is not really. To adapt a related note http://www.hxa.name/notes/note-hxa7241-20101218T2158Z.html http://www.hxa.name/notes/note-hxa7241-20101218T2158Z.html from a while ago:
What makes writing writing is what it is used for. Writing is used for communicating between humans. It only works the way it does because of what is on the other end of it -- another person.
And that is why software must be different. Software is different from writing because its (ultimate, essential) purpose is different (and particular): it is not communication, it is (engineering) design. It works the way it does because it is for constructing an artifact.
When you look at software, what you see is not language, it is a machine.
To represent a machine requires a particular kind of structure. A machine has a particular form, and a description or notation that captures it must reflect that form. That form seems to be a recursive, hierarchical regularity -- a nestable scaffolding. And a machine has a core of objective logical rigidity.
Writing lacks this hierarchical logical structure. It communicates illogically, by allusion, impression, etc. Its use meant it never evolved any other way.
Instead, software must have this logical structure. The term 'programming language' is perhaps a source of the confusion, now unfortunately established. Software does not communicate to a machine, it embodies the machine.
- nessus42 15y agoAbleson and Sussman might beg to differ. From SICP: First, we want to establish the idea that a computer language is not just a way of getting a computer to perform operations but rather that it is a novel formal medium for expressing ideas about methodology. Thus, programs must be written for people to read, and only incidentally for machines to execute.
- hxa7241 15y agoThey want to emphasise a point. But think of what is indispensible. If the program was unreadable -- maybe the source is lost -- you still have a running, useful, device. But if you do not have execution, you do not really have software anymore. Software as function -- for execution -- and software as representation -- for humans -- must be pretty much equally important, in the end. But surely the key constraint, the definitive matter is what software does, what it is as an artifact. We can communicate about anything, but software is software because it performs some action.
- St-Clock 15y agoIt'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.
- AlexandrB 15y agoAfter reading this and thinking about the blog post a bit more, there is another difference. Only essays that are very technical in nature are purely explanatory. Usually an essay must persuade the reader as well. When was the last time you had to persuade a computer?
- onemoreact 15y agoThe essay seems to miss the point. While programs have little in common with the written word the act of programming is similar to the act of writing in that someone will read your code. It's not that hard to write something that people can decode, but it usually takes a fair amount of revision to remove the craft and add clarity. That’s not to say everything must be a masterpiece, but just as a great speech can inspire a nation some code just plain runs things. PS: The most interesting program I ever read fit into 4kilobytes of ram. At the low level it employed plenty of twisted logic to fit into a limited environment, but the overall structure was plenty elegant to call it poetic. Just think cooperative multithreading, networking, and the ability to deal with quite a bit of memory errors in 16kbyte of source code and yet you could still understand what's going on.
- gruseom 15y agoSource code is written for people as well as machines.