3 ms·
If you're used to it, I'd guess you can read [EDIT: was five; thought more] two to four symbols in the time you can read a short name. And you can use the highe
by mlochbaum 5y ago
If you're used to it, I'd guess you can read [EDIT: was five; thought more] two to four symbols in the time you can read a short name. And you can use the higher-level pattern-recognition skills that would otherwise be applied to reading names to understand combinations of symbols. At least for me it's much easier to visually manipulate symbols in my head.
You've written as though using symbols instead of names comes at an extraordinary cost. Having used both I don't think this is the case (and it's the conventional languages that force you to use words; you're free to define reverse ← ⌽ in APL but usually not the other way around). If you want to read more about this perspective, you could check out my page "What is a primitive?" discussed on HN yesterday: https://news.ycombinator.com/item?id=28060423 https://news.ycombinator.com/item?id=28060423
- valenterry 5y agoI doubt that it can be read much faster. Think about newspaper: you don't read the symbols that make up words - you literally read the words themselves. Taht's why it is pettry esay to fllw txet wtih miexd up caharcetrs. As long as first and last latter stay the same. One advantage is that long expressions might fit in one line, but that's about it. I mainly use Scala, which allows to use symbols like ← ⌽ as well and quite a few libraries do that - but I found unless it's a very commonly used symbol, it's not helpful for productivity.
- mlochbaum 5y agoThese are the "higher-level pattern-recognition skills" that I was talking about. You use them to read words; I can also use them for something like (in BQN) -⟜» (subtract previous from current) or +`⊸⊔ (split using start markers). There's an opportunity cost. To be clear, you do think there's an advantage to using symbols for very common operations? APL doesn't have all that many primitives (~60 symbols), and most would fit this requirement. Here's Alan Perlis[0]: "The large number of primitive functions, at first mind-numbing in their capabilities, quickly turn out to be easily mastered, soon almost all are used naturally in every program — the primitive functions form a harmonious and useful set." [0] https://www.jsoftware.com/papers/perlis77.htm https://www.jsoftware.com/papers/perlis77.htm
- civilized 5y agoIf APL is so ideally productive and the barriers to its adoption so substantially slight, why has it not won? The programming community has been extremely open-minded to revolutionary new approaches. So very many have gained at least a foothold and a small group of devotees, from LISP to Haskell to Forth to APL. But none of these languages have built communities of a size and productivity to match Python or C or the many other highly successful Algol-family languages. This despite the fact that some of these off-the-beaten-path languages, especially LISP, have a long history of being used as teaching languages. So why hasn't APL taken off already? Surely there must be a more thoughtful answer than "people are Philistines". Perhaps both APLers and LISPers greatly underestimate the challenges of adopting new symbolic notations that are very different from what they're used to in written language and mathematics. Maybe for the average technical person, the cognitive costs are much greater and the benefits much less than they seem to the average APL or LISP fan.
- foxfluff 5y agoI think it's naive to assume a language would "win" on its own merit. Most of our software today is what it is due to path dependence. Was JavaScript a terrific language? No, it was a little doodle for bringing a little interactivity to websites, which were simple at the time. The web took off; thus JavaScript took off. If the web had never taken off, JS wouldn't be a thing. Same for C. What was so great about C, or its predecessor B? Nothing really. B was a minimal language designed to fit the constraints of a minicomputer. Unix happened, C was a natural evolution of B, Unix took off as a simple & cheap (even free) operating system for cheap computers. C got popular with Unix, and not due to anything revolutionary in its design. C++ rode the OOP hype wave and C's popularity. C#'s popularity is due to Microsoft's massive influence. Java similarly rode the OOP hype train and I guess Sun's marketing towards their many Enterprise customers (who also bought the "write once run anywhere" lie). Remember when PHP was popular? Was that because it was such an awesome language, or was it because it seemed easy and integrated well with this other popular thing that took off (the web)? (On a similar note, it's not clear at all that Linux would have become as popular as it is today if it weren't for the lawsuits looming over the BSDs in the 90s) Of course I'm oversimplifying and glossing over a lot of history but in the decades between Unix and C#, there have been countless programming languages that could have easily challenged each language that I named on their own merit. But that merit does not matter, because that's not what makes a language take off. If anything, the programming community seems rather reluctant to consider different approaches, and when they do it, they would rather do it in the comfort of their existing languages and ecosystem of tools & libraries rather than jump to something new entirely. Lisp and Haskell never got mainstream despite their use in teaching, but I think most of the programming community today sees the value in functional thinking and immutability; thus various constructs that have been historically exclusive to functional programming languages have made it into mainstream languages. You couldn't take lambdas and map & reduce for granted in 2000 and the FP aficionados had a fight ahead of them to convince the mainstream that they aren't just trying to be clever and look smart. And on the topic of teaching, I'll have to point out that LISP has absolutely not been a teaching language across universities around the globe. MIT is not a representative example. Most unis and colleges just stick to what seems to be mainstream (20 years ago: C, C++, Java, ...; today C#, Java, JS..) or just easy to start with (Python) and languages like C and Haskell are now reserved for one-off/in-depth courses about specific topics. If anything, I find it surprising that LISP has as big of a following as it does today, but I guess its (limited) use in teaching plus writings from certain influential people (including the author of this very site) have had their effect. APL by contrast has faced challenges; it was considered too easy to be a teaching language. Other challenges include the symbols, but not because they look scary and alien! We might take the ability to type fancy glyphs for granted today but go back a few decades when computers were using 8-bit character sets, often wired to glass terminals or printers or framebuffers with a hardcoded character set.. you'll start to see the problem. You literally could not enter or view the APL symbols on a lot of computers available at the time. Interoperability with other character sets absolutely was a real challenge and probably alone sufficient to push APL mostly into obscurity for a long time. And indeed this issue was important enough that Iverson moved on from APL to create J. Even this site shows how reluctant people are to accept anything new and alien looking. Almost all postings about APL feature the usual knee jerk reactions to the weird looking syntax, tersity, and symbols. APL and its kin go directly against what's been preached as best practices in programming for so long now that it's not surprising that people are uncomfortable with it. Doubters are not going to judge APL on its merit, because they won't learn it. I think there's a lot to criticize about APL and its ecosystem (let's be clear that due to its relative obscurity, it has missed a lot of the potential evolution and progress that a vibrant community would bring with it), but I think few here are willing to look beneath the surface. Indeed most developers just need a language with mature tooling and libraries and big community, everything else is secondary.
- foxfluff 5y agoI think it's something you just have to learn to believe it. Otherwise you'll doubt it forever and ever. APLers have learned, and they want to keep their symbols. I can only speak for myself, and I know I'd be confused seeing code that says (enclose bind grade-up index right), but when I see it spelled in APL as (⊂∘⍋⌷⊢), I will immediately recognize it as sort. It really does feel similar to the difference between "es you es aitch I" and "sushi". I don't need to spell out every symbol, that just makes it harder to pattern-match and see the meaning.
- foxfluff 5y agoOh, this interesting little thing I noticed just now: jodrellblank also mentioned "enclose bind grade_up index self_right" hours before me in https://news.ycombinator.com/item?id=28095934 https://news.ycombinator.com/item?id=28095934 And I had read that comment! It just didn't register at all when I read that comment; even though I read it word by word, I did not realize that he also wrote the sort train (until I read it again now and converted to symbols in my head). Yet I would have immediately recognized it had I seen it written as APL symbols. Visual pattern matching can be strong. (It's what allows you to recognize and read words that you do not know how to spell correctly.)