3 ms·
> The only reason you find the c-style version simpler is because that's what you are used to. Well, yes. But we're taught infix notation early (x+y), and func
by e12e 7y ago
> The only reason you find the c-style version simpler is because that's what you are used to.
Well, yes. But we're taught infix notation early (x+y), and function application quite early too (y=f(x) - and in combiation (also note short-hand eliding multiplication): f(x) = 2x + 1).
I still find array languages to be too dense for me - but I do understand that they are simple from a certain point of view.
- smabie 7y agoI did too, but just try them out for a week, you’ll love it. Moreover array based language like Q do have infix notation. f(x)=2x+1 In Q is f:{1+2*x} You could call it with: f 5 or f[5]. It’s really not any different.
- e12e 7y agoHm, I could see myself playing with it - but I'm not quite seeing how I'd fit it into my day job. I do occasionally work with some simple aggregation and filtering - but usually in an sql db - and barring embedding an array language, I'd have to fetch all the data into eg: klong first, then process. It's hard to imagine a scenario where that would make sense. Otoh, I'm still considering working through advent of code - such domains should be well suited, I guess.
- smabie 7y agoIf you're writing business logic, I'm not sure how helpful array-based languages are. The code would look very similar to a normal language, but without the classes or methods or objects. For advent of code, it really shines though. Read in some big chunk of data, do a bunch of matrix and list operations to get the answer.
- e12e 7y agoReally like the introduction by the way, it reads better than most I've read on apl/k - with a suitable mix of motivation and explanation - and not too much "pride" (like, lisp pride, or apl pride, where authors cannot imagine any reason why other languages exist. Seems especially common when run-times are written in such a language; namely C...). To be clear, a little language pride is always warranted :-) Other than that, I find it a bit funny that the factorial function is singled out as an example of why naming (short) functions are redundant - seeing as how it's one of the first "complex" functions/operands thaught/named in mathematics, and heavily used to shorten notation for for example combinatorics (that is "n!"). But I think this just reflects on the (for me) somewhat alien culture of array languages - its not wrong, but it is different.