Hacker News new | past | comments | ask | show | jobs | submit login

I personally question the utility of such terseness, and much prefer the verbosity of the Lisp family of languages, where cultural norms make for function names like "number-to-string" and "expand-file-name", rather than the norms I've seen in languages like APL, K, J, Q, OCaml, and Haskell, which seem to love more mathematically-inspired single-letter names like "n" or "k", and various operators in a similar vein.

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.




For me, terseness is necessary for correctness.

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.


The notation can yield very dense programs. Significant systems have been written that can be expressed on a screen or two of code (search Arthur Whitney APL for "the legends").

When we learn to read, we learn to "sight read" words. APL/J/K constructs can be "sight read" as well.


Sight-reading is a great analogy because as with music, in order to stay fluent and make one's performance (or sight-reading) easy, one has to stay in constant practice.

I'd argue that much less of this is required for languages like Lisp, unless, of course, you step away from practicing reading English, in which case maybe the very English-like programs of Lisp will start to seem foreign to you.


I think you're just bad at reading pointfree notation, tbh, which is not a particularly interesting commentary on OCaml or Haskell.

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.


"You can write OCaml/Haskell with names like doesFileExist when you need to."

You can, but it's rarely done in practice. This is a cultural issue more than a language issue. OCaml/Haskell programmers just seem to prefer much shorter, more math-like names than Lisp programmers do.

For me this makes a huge difference when reading through code written by the community. Lisp is just much more immediately understandable than OCaml/Haskell and related languages.

Yes, this is probably my own limitation, and I'd probably be a lot better at it given enough practice. But I just don't need that much practice to understand Lisp, and I can go away from it and come back to it much later without needing a significant refresher in the language either.


Interestingly, I noted I tended to use one letter variables when writing in Ruby, and the longest, most descriptive possible variable's names when writing in C#; And Ruby, I think I have read somewhere, is somewhat close to lisp. There is the readability of the language itself to weight in too, when its easy to see the important stuff, you can name the important stuff with short names. And there is the most important, what are you writing about; Strangely I always remember to myself that the only important goal is to write the slowest, most natural language, and above all, most natural/daily-life/ELI5 Logic. But always end with the logic looking like pure math notation, like if I looked at it not knowing it was me who wrote, would think is unreadable Dark Magic Math, and I end with it having zero Math or CS formal training (only highschool), so maybe it's inescapable.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: