5 ms·
I used APL extensively for about ten years. I was introduced to the language by a physics professor in college who was quite vocal about having his students le
by robomartin 13y ago
I used APL extensively for about ten years. I was introduced to the language by a physics professor in college who was quite vocal about having his students learn the language. I ended-up using it professionally for a wide range of applications, from inventory management and core business operating systems to robotics and DNA sequencing.
While the language is wonderful I would not use it for production systems today. It is my opinion that the language came to be too early and, as a result, has not seen innovation for decades. It also does not help that the leading APL implementations cost thousands of dollars to license. APL is still being used extensively in financial institutions in Wall Street.
J has been mentioned here a few times. Even though J is the work of APL's creator, Ken Iverson, whom I had the pleasure of meeting at various APL conferences, I consider it an abomination and a huge step backwards. I have a feeling Ken might have sought more commercial appeal by using ASCII characters rather than specialized notation. Ironic because of [1]. However, in making this switch, he created a horrible mutation that anyone can rightly recoil at. The language looks like a random vomiting of ASCII characters on the screen. Sad.
Many have commented on APL on this thread. In most cases it is obvious that these comments come from lack of or limited experience with the language. The power of APL comes from two things: Abstraction and Notation.
Abstraction is very much like objects in OO languages or specialized symbols in mathematics.
Notation --through specialized symbols-- is huge. Ken Iverson's own "Notation as a tool for thought" [1] covers this in far more depth than I could attempt here.
I'll just mention one example: music notation. A page in an orchestral score looks like gibberish to someone unskilled in the art. However, to a skilled professional it reads, well, like music. While I am not at that level, I can read guitar or piano sheet music and imagine, for lack of a better word, the music with reasonable accuracy.
That's what happens with APL if you really know it: You read it like music. Much of the criticism and misguided opinion comes from people who simply don't have this level of proficiency with the language. All other languages allow you to be a pretty decent "hobby" programmer in the sense that you don't have to be able to read it like music and you can still produce and maintain software. APL, for non-trivial work, requires true expertise, not superficial exposure. It rewards you with unparalleled productivity and expressive power. It really is a cool language, but you have to invest the time to learn it and read it like music.
Another way to put it: It's like vim. It's a shit code editor until you invest the time and effort to use it instinctively, to play it like a reasonably skilled musician would play a piano: without having to think about which finger to use to press a certain key to produce the desired tone.
That's APL. It's very different than using C or Java. It requires expertise, time and dedication. And perhaps that's the source of its demise. Today most programmers don't care about diving to those depths. Most want to learn the basics and poke around API and code libraries to get shit done and consider super-simple stuff like pointers confusing and complicated.
BTW, to me Python has a number of APL-like features that make it fun and productive. I really enjoy it.
[1] http://www.jdl.ac.cn/turing/pdf/p444-iverson.pdf http://www.jdl.ac.cn/turing/pdf/p444-iverson.pdf
- gtani 13y agoI used to know APL2 well, and worked on some large workspaces at Merrill Lynch, 10K's of LoCs. I really liked the language but not the job. There were language dialects, you could tell if somebody had a Sharp or STSC background, or if they had come from Morgan Stanley (the code at Merrill and Lehman was pretty similar, at least in the area i worked in). Interesting times. ___________ also compare "under" in J to loan patterns and all the resource allocation mechanisms in algol family languages http://prog21.dadgum.com/121.html http://prog21.dadgum.com/121.html
- robomartin 13y agoRight. On the PC I started off with STSC. I had a brief exposure to APL on mainframes but the PC version was far more capable and useful. I liked some of the direction taken by IBM with APL2 (nested arrays and other primitives) while keeping to the concept of notation being just as powerful as abstraction. Also, our 10K LOC workspaces is potentially equivalent to hundreds of thousands of lines of code in something like C. Another way to put it is that a single programmer can do the job of five or ten programmers in another language. And do it faster.
- jdc 13y ago> While the language is wonderful I would not use it for production systems today. It is my opinion that the language came to be too early and, as a result, has not seen innovation for decades. What APL need that only more modern languages have?
- robomartin 13y ago> What APL need that only more modern languages have? Let me preface this by saying that I've been away from regular use of APL for years. I've forgotten a lot of the details but I'll throw out o few seat of the pants thoughts on this. In no particular order (and not specifically related to modern languages): The option for compilation would be very interesting. Within a function, variables are global by default. Huge pain in the ass. Objects. A language-defined interface to C (or some other suitable language) for when you need to speed things up. An extension to nested arrays that allows you to create C-like structures. I am going after the self-documenting nature of having structure members have name-based access. An extension to function definition to allow for more than two arguments. This would require a little language re-thinking. I would also look into making a hybrid that includes some C-like syntax with an APL core. C/C++ -like comments and conditionals with bracketed groupings of APL code would go far in making code easier to read and organize. Native C-like switch() primitive with APL-inspired extensions. For example, switch could take a vector argument. APL-run-time-definable comparison operator. Sometimes I want to apply a complex evaluation function to data rather than the simple equal, not equal, grater/less than, etc. operators. The ability to enforce data types if desired. A means of telling the compiler/interpreter to optimize code --at the statement level-- for speed or resource (memory footprint) and other criteria. Certain operations can explode into huge multidimensional arrays which isn't always the best idea. Real-time extensions integrated into the language. Ability to use GPU resources for computation. Standard interface for custom hardware-based acceleration (read: custom FPGA boards). True binary vectors and arrays. More flexibility in multidimensional array indexing. A rethinking of the workspace model to better support multi-developer environments. Genetic and Evolutionary computing primitives built into the language. Built in primitives for multi-threaded/multitasked computing. Built in primitives for network access and processing. Built in primitives for multi-core and distributed computing. Built-in primitives for data exchange. For example, ingest or output nested array data from/to JSON, SQL, XML or other modern data formats. Better pattern-matching primitives. I'm thinking at least regular expressions. A general cleanup of the notation to remove lame text-based "fixes" from an era when rendering non-ascii characters required custom ROMs on the graphics card. All APL notation should be symbolic. ASCII should be limited to strings, function, variable, object and other constructs that require text. Make it open source and make the open source version far superior to any available commercial version. Like I said, I've been away from APL for a while. I am sure there are a lot more important enhancements I could suggest if I spent a year seriously getting back into the game. Today I have very little use for APL outside of using it as an advanced calculator of sorts, mostly when I do hardware design. Even then, sometimes it is more convenient to use Excel for that purpose because of the value in being able to communicate with others.