3 ms·
From someone who has experience in mostly SQL, Python, Linux commands, and a smattering of other languages that I've played with (Haskell, Common Lisp, F#, Ada,
by 7thaccount 7y ago
From someone who has experience in mostly SQL, Python, Linux commands, and a smattering of other languages that I've played with (Haskell, Common Lisp, F#, Ada, Prolog, Julia, Forth, Fortran...etc) I can say that J and modern APL systems are completely different in a lot of ways. Yes functional languages have a lot built around map/fold/filter that is very similar to J's tacit programming, but the implementation makes all the difference. With J you just have math basically (assuming you don't use the non idiomatic if-then constructs). I'm not saying J is better than Haskell at all, but keep in mind that when they say "loopless" it's possible that what they're trying to convey is that there are no imperative loops AND the combination of dynamic typing and tacit trains means you have something terse with zero boiler plate.
- jandrese 7y agoIt seems to me like it is terse because this is a DSL for dealing with vectors and arrays of numbers. Sure the equivalent C for loops are a lot more wordy for the problems that this language solves, but you'll drive yourself crazy trying to write a simple event loop for your GUI in J.
- tluyben2 7y agoYou do everything differently in j/k/apl, so the notion of eventloop is not what you want to do there (under the hood that happens ofcourse). People would not typically write GUIs in these languages but you can [0]. They are actual languages, not DSLs. [0] https://www.jsoftware.com/help/primer/gui.htm https://www.jsoftware.com/help/primer/gui.htm
- 7thaccount 7y agoYou're not too far off in my opinion. Yes, you can write beautiful code dealing with arrays, scalars, and matrices, but as you pointed out...it breaks down for other tasks. Opening files in J uses numeric handles that if I recall look something like this (5:!1) which is a little weird, but perhaps not hard once you learn it. It should be noted that Dyalog APL has easier to use primitives for CSV, JSON, SQl, and XML. It also has full interop with .NET on Windows including GUI. J also has GUI capabilities that people use, but it did not appear straightforward.