6 ms·
APL is alive and well and widely used. It’s just evolved into more verbose forms known as NumPy, R, and other Iverson Ghosts [0]. Turns out people love array p
by MontyCarloHall 5y ago
APL is alive and well and widely used. It’s just evolved into more verbose forms known as NumPy, R, and other Iverson Ghosts [0].
Turns out people love array programming but hate terse syntax.
[0] https://dev.to/bakerjd99/numpy-another-iverson-ghost-9mc https://dev.to/bakerjd99/numpy-another-iverson-ghost-9mc
- mikl 5y agoOne mans “terse” is another mans “cryptic”. Languages like R are both easier to for the average programmer to read and (much) easier to type.
- jodrellblank 5y ago"Turns out people love array programming but hate terse syntax." People hate Java and COBOL and XML and PowerShell and ActionScript and SQL for their verbose syntax. People adore `x ? y : z` while complaining about unreadable terse syntax that with symbols that don't say what it does in English. Why do people put up with data[4] to get an item out of an array with a special single-purpose symbol heavy syntax instead of index(data, 4)? How come the symbols are never the problem when people are familiar with them? Can it just as easily be explained by "people like what they're used to, people hate change"?
- qwerty456127 5y agoTerse is generally better than verbose but it has 2 problems: 1. Learning curve - most of the people immediately dismiss what they can't intuitively understand straight away, even if it requires just some minutes to grok and a cheatsheet during first days of usage. People need to have at least very basic clue immediately to get interested and feel motivated to invest further attention. 2. Terse syntax/vocabulary encourages packing overly complex logic into one-liners which become brainfuck to read and reason about even for yourself shortly after. I believe it's not hard to develop automatic decoders for such expressions which would split them into multiple lines introducing intermediate variables, structure them with indentation and/or highlight corresponding elements but people probably prefer to just read the code immediately rather than to use advanced tooling even to read it. I indeed adore `x ? y : z` and similar things and use these heavily but always split the expressions in separate indented lines every time I nest them. Some times I also use ReSharper to convert some verbose C# code I wrote into much shorter (Linq or something) but in not-so-rare cases I then fail to understand the result and have to remember/comment what does it do. I would often revert to verbose unless I'm sure this part of the code is not going to need to be debugged ever after.
- deleted 5y ago[deleted]
- rbanffy 5y ago> People adore `x ? y : z` That’s not APL. It’s all ASCII. One of the issues I experienced in college was being unable to verbally communicate APL code to colleagues. We called the comment symbol “finger”.
- jodrellblank 5y agoThe ASCII standard RFC depicts ":" and "?" in the "symbol" column of this table: https://datatracker.ietf.org/doc/html/rfc20#section-4.2 https://datatracker.ietf.org/doc/html/rfc20#section-4.2 If you don't know the name of ":" then you can't verbally communicate it to a colleague, and saying "it's ASCII" doesn't mean you magically know its name. If you know that ⍝ is called "lamp" then you can verbally communicate it. "It's bad because I don't already know it" feels like a weak kind of criticism.
- rbanffy 5y agoSo, instead of reading a keyword, you had to memorise the names of a couple dozen symbols and their meanings. Not impossible, but not great.
- rak1507 5y agoI don't want to repeat myself here so I'll link a previous comment https://news.ycombinator.com/item?id=28094051 https://news.ycombinator.com/item?id=28094051 The tl;dr is that while you have to learn a few more symbols, the benefit of that is they're so composable you don't have to learn anywhere near as many keywords, because they can be defined in just a few characters.
- rbanffy 5y agoYou still need to learn their names and meanings instead of learning names/keywords and their meanings, minus symbols. I'm repeating myself in hopes it becomes obvious that learning the symbols is not needed in other languages because the keywords are already the names we would need to learn anyway and, usually, also make it easy to derive their meaning. Think of how you read code in an unknown language - you look for patterns you usually see and use the names of keywords and variables to understand both what's being done and why. With "vintage" APL, the symbols are opaque and you are left looking for patterns you probably won't be able to identify without first understanding what the symbols mean, because both syntax and alphabet are unknown.
- chx 5y agoThere's a balance here between terse and inscrutable. The line is fine.
- HelloNurse 5y agoPeople like typing code on their keyboard, so it's mainstream hardware that doesn't care about APL.
- hoosieree 5y agoI think people actually prefer terse syntax, but only for things that are already familiar to them. Most languages use "+" instead of "plus", because the audience knows it already. Some languages (I'm thinking of Rust's Result/try/? syntax) have gradually evolved some parts of themselves from verbose to terse as people became more familiar with the concepts, so I would not be surprised if Python/NumPy follows a similar path. Python only added a symbol for matrix multiplication ("@") in version 3.5, probably because many of its _current_ users are already familiar with the concept. When Python was first introduced, it seemed to be more of a Perl or Bash replacement, so dedicated syntax for matrix multiplication would have been weird.
- deleted 5y ago[deleted]