zlacker

[parent] [thread] 0 comments
1. dTal+(OP)[view] [source] 2020-12-01 14:08:56
I only mentioned Numpy as an example of a ubiquitous array paradigm, that most HNers are likely to know. It's a bolt-on to Python, yes, and it's ugly, and it's clearly inspired by APL which came first. All this is true.

But the power of abstraction of APL is available to any other language, with the right functions. Most scientific languages come with those functions out of the box, as demonstrated by my 1<->1 translation of 'Life in APL' into Julia above. And APL doesn't give you a bunch of other really useful general-purpose stuff; that's why I term it a 'DSL'. It's a one-trick pony. It's a great trick, but it's ultimately not quite enough. That's why NumPy hasn't replaced pure Python - you still need to get your hands dirty outside the array paradigm from time to time, and APL is very primitive at that. In fact there's nothing to stop anyone from aliasing array-functions to their APL equivalents in any Unicode-aware language, like Julia (oddly, nobody does). What you're left with is a rather basic parser, some odd syntax quirks like arrow assignment, and some ugly imperative flow control.

Are the fancy symbols really worth it?

[go to top]