In the context of setting the objectives for education in computer science for general students, I like the idea that the objectives are to (a) understand the limits and potential of computation and (b) achieve fluency in programming such that one can conceive of and describe computational processes for a wide range of tasks.
He explicitly suggests that fluency in using other people’s programs not be an objective. Perhaps this is a bit idealistic since most programming in the wild today consists of glueing together other people’s programs. But it seems like the right objective when possible—-in some ways it is a view of computer science as a liberal art.
"Some years back, we had a visit at Carnegie from a person at MIT whose name I've forgotten. He started to give us a lecture in a little office about some programming issues in LISP. He went up to the blackboard and he spoke LISP. Everything he wanted to describe, he described in terms of parentheses and CONS and CARS and CDRS. He found himself quite capable of expressing his ideas in the language in which he programmed. Not once during the half hour or so that he lectured to us did I see the inevitable block diagram, the flow charts that show up on the blackboard with things written in semi-English. He didn't need them. And at the time I said to myself, "LISP has a very precious character, if indeed there are some people who can express programming ideas to other people in the language in which they program.
"I can't do that with ALGOL; never have I been able to do it with ALGOL. Whenever I've programmed in ALGOL and I've wished to make some statements about the program I was writing, I was forced to go outside the language and use English, or mathematics, or some block diagrams or what-not.
"In APL, I find that to a far greater degree than any other language that I've used, I can make statements about the programs that I'm writing, in APL -- actually not exactly APL, but APL with some nice little extensions that I dream up at the moment but would never think of implementing. But by and large, I find that the language allows me to express myself, in the language, about the things I'm dealing with. I find that a very precious property of a programming language."
Does this mean APL without extensions is quite limiting?
> APL is like a beautiful diamond – flawless, beautifully symmetrical. But you can't add anything to it. If you try to glue on another diamond, you don't get a bigger diamond. Lisp is like a ball of mud. Add more and it's still a ball of mud – it still looks like Lisp.
> Moses strongly denies this, claiming he instead called Lisp a bean bag because it always returns to its original shape.
Relative to APL, the interesting matters in Lisp tend to lie on the other side of the AST hill.
https://scottlocklin.wordpress.com/2013/07/28/ruins-of-forgo...
APL is more French than English [https://news.ycombinator.com/item?id=18640451]
Indeed. Because both APL and Lisp began as languages for describing computational ideas, it stands to reason that they would be particularly fit relative to languages that evolved under other fitness criteria.
I was intrigued to not the opposition to APL mentioned in the article by Djikstra and others on the basis of a different mental model of computation.
Once you learn APL, you gain a super-compact mathematical notation in which to express computation.
You also learn the value of extensive comments and of avoiding being clever - if you try to be clever, you won't understand your program 5 seconds after having written it.
And, if you are really lucky, you'd have learned what a beam-spring keyboard feels like. :-)
Even though the set of short symbols has to be limited, don't we currently have a few dozen often-repeated operations in language keywords and standard libraries? (Especially in the approach of e.g. Clojure, relying heavily on combining standard transformations on strictures.)
I use k/q regularly, and I'm not using it for "math".
The compact notation creates value in helping you make correct programs. See [1] and [2] specifically.
[1]: https://news.ycombinator.com/item?id=8476294
[2]: https://news.ycombinator.com/item?id=8476702
You can write C in a dense style as well. And I do. When I do this, I can see opportunities for reuse that I cannot see if I spread my C program across multiple pages and multiple files. Here is the bulk of my webserver[3] that will beat the pants off of any other webserver -- substantially faster than nodejs or kdb's own webserver[4], and probably nginx or anything else you've got. (PS: If you think you know of a faster one, I'd like to know about it).
I am telling you I can only do this because the code is small.
Let me refer you to the TechEmpower framework benchmarks: https://www.techempower.com/benchmarks/#section=data-r17&hw=...
Look at the language column there, you'll be surprised.
The Lisp-like way of programming is more appealing to me because it makes the programs very easy to read. You can mostly get a sense of what they're doing just by reading them like ordinary English. I've found this especially useful when I'm trying to understand code I'm not already familiar with, or when looking at my own code months or years from when I wrote it, and it's especially important these days when polyglot programming is commonplace -- I don't need to remember nearly as much of how to do something in Lisp because it's so easy and straightforward and doesn't have the overhead of remembering a whole bunch of specialized syntax.
Contrast this with the terser, more mathematically-inclined languages, where specialized syntax and single-character names are widely used. These tend to be more write-only languages for me, where I have to be constantly steeped in the language in order to make understanding it relatively natural, and if I go away from them for a while, it takes quite a bit of effort to get back in to them enough to make sense of what was written, and reading other people's code is much more of a chore than it is for me in Lisp.
In the old days, or perhaps on embedded systems these days, when one had to closely watch the byte count of one's program lest it not fit in to memory, perhaps such terseness was useful. But these days, I'm not yet convinced of its utility outside of a mathematical context, where the mapping of such terse names and operations is more natural.
For me clarity trumps terseness.
I don't just do this with APLish languages; I do this with C (and lisp, and PHP, and others...)
I've only ever written short programs correctly: If they can fit on a page, I can just look and see whatever bug I might be experiencing.
If someone wants to change my software, it's because they want it to do something that I don't want it to do. They will find value in the fact it is short: That there isn't very much to read. Admittedly, a programmer unexperienced in this method may have some anxieties about it, but given how valuable correctness is, I'd prefer to cause a bit of anxiety in beginners than make programs that need beginners to fix them.
When we learn to read, we learn to "sight read" words. APL/J/K constructs can be "sight read" as well.
Lots of things lend themselves well to pointfree style, and if you do not see them it is because of your own horizons.
You can write OCaml/Haskell with names like doesFileExist when you need to.
What APL does well is filter/select/transform more spreadsheet style work than linear algebra stuff. It's a language to describe computation as meant by the sort of computer scientists that were born when computer was a job description.
Come to think of it, that's similar to what's often done to lists in Lisp, outside of the more traditional control flow of 'business logic.' Precisely the filter-select-transform.
I wonder if APL is that much different from Matlab by the concept.
https://github.com/Co-dfns/Co-dfns https://news.ycombinator.com/item?id=13565743 https://news.ycombinator.com/item?id=13638086 https://news.ycombinator.com/item?id=13797797
At least around here, this strikes a nerve. Especially 40 years later. All of the colleges in town prep for the local market of tech rather than the fundamentals that may be advantageous overall and potentially financially more so out of market. I know stellar remote and small / mid size shop engineers in this part of the south, but by and large the schools are completely myopic about this and perpetuate the microcosm of low paid enterprise focused sweatshop cubework. I realize to paint it with such language is hyperbole but it's certainly not the exception to the rule.
As an aside, KDB devs make bank, like salaries >500k
I was curious about it, but they really don't make it easy to get started. There are no links to any documentation anywhere on their site. The download is hidden behind a licensing agreement and a form asking for the user's personal information. They mention GitHub (in the context of "community support") on their download page, but there are no links to any GitHub repos.
Can you imagine? APL is an amazingly powerful language. It's easy to write nearly any mathematical function in it. What if it was faster than every other mathematical language? It would probably dominate the market overnight.