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

I disagree. There’s a reason NumPy is extremely popular and APL/J never were, even though semantically they are extremely similar [0]. It’s not because it’s difficult for people to grasp the underlying concept of array-based programming, it’s because NumPy’s notation is far simpler to learn.

[0] https://analyzethedatanotthedrivel.org/2018/03/31/numpy-anot...




APL (and especially J and K) are about a lot more than array based programming, and NumPy didn't try to encompass those, which is part of the reason it is easier to learn.

K below:

    ,//

    |/0(0|+)\
The first expression is usually called "flatten" (take a nested list and produce the list of all items in a single-level, in order). The second expression is a solution to the maximum-subarray-sum problem. Both of them leverage a hell of a lot more than "array" programming; in each case, every single character brings its own semantics, and the combination yields the semantic of the entire expression.

Not disagreeing that NumPy is more popular. Am disagreeing that they are "extremely similar".


That doesn't sound right to me; APL's notation is not particularly difficult to learn, especially if you're familiar with existing basic math and programming language symbols. What's hard is grasping the underlying concept of array-based programming and using it to do useful work and solve problems. NumPy is popular because it piggy-backs on a popular, widely used, and free language which also does a lot more than array manipulation, if NumPy existed on its own then its notation would not be simpler to learn it would be bizarre.




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

Search: