5 ms·
Does a language like APL/J really offer something more than other matrix/math oriented languages (Matlab comes to mind)? Other than extreme conciseness (unread
by nimrody 16y ago
Does a language like APL/J really offer something more than other matrix/math oriented languages (Matlab comes to mind)?
Other than extreme conciseness (unreadable at times).
- silentbicycle 16y agoMaking looping implicit seems to have huge benefits, in particular. It shrinks the code down quite a bit, much like the implicit search does in Prolog. As for the unreadability - I can't read Turkish, but that has more to do with me than Turkish. Good APL really isn't that hard to read: The syntax is incredibly consistent, and while unfamiliar symbols are used, there aren't that many, and most are mnemonic - for example, the reverse operator is a circle with a vertical line through it, like a semicircle being mirrored.
- rbanffy 16y ago> Other than extreme conciseness (unreadable at times). I have to agree with that. My APL programs were the epitome of write-only code. Even with comments, the magic being performed on the one-liner after them could hardly be described in less than 10 lines. I suspect good APL programs have a comment to code ratio of more than 10.
- beagle3 16y agoExtreme conciseness, though sometimes unreadable, is often helpful in the sense that you can fit 3000 line Java programs on one 50 line screen -- no scrolling to look things up. It doesn't mean it takes 1/60 time to read through it -- I would guess 1/5 is more like it (assuming you are competent in the language you are reading, which is a steeper learning curve for J/K/Q/APL). Personally, having everything on the screen at the same time is very useful. Also, as J and especially K prove, extreme runtime speed is also attainable. You can beat it with C code -- after all, the K interpreter is written in C. But more often, K pushes you towards a concise implementation that the interpreter blazes through, whereas in C you'd probably not go to the effort all the time and result in slower code at the end.