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

If that means "you don't get much more than what C offers", then I'll take that as a no. I18N, Unicode, Regex, built-in string manipulation functions, character set conversions and efficient data structures are table stakes at this point.



Sigh.

No, it’s quite a bit more than C offers, which has a paltry twenty-eight “operators”, none of which “work” on arrays. Most of the libraries in C and C-like languages have huge libraries because getting those twenty-eight operators to do anything can be a lot of work if you don’t think about it much.

In contrast, Iverson has more than 50 excellent operators, sensibly extended to arrays. Not all APLish languages have all the operators, but the choice about what they do have typically considers how all of Iversons operators can be/are used and how/when they can be implemented in terms of each other. This is largely a matter of taste.

And better symbols means better ideas. Some things are just more obvious in APL. And once you see it, you can take it with you.

When using C, I don’t typically use the C library, or libraries for any of those things you mentioned, because they just aren’t that complicated once you have seen APLish solutions to those problems. And that’s a good thing because less code means less bugs.


So if I understand you right, APL treats strings as arrays of whatever. This makes sense and isn't particularly hard to understand. Is there a way to treat Unicode strings as arrays of graphemes, instead of bytes or codepoints?


Dyalog APL does this by default.


It does code points, not graphemes. Graphemes are a pretty niche thing, I believe? Raku's the only language I've heard of having built-in support rather than using a library.


Ah oops, I misremembered what they were.


APL is very decent at string manipulation. I could try to explain why, but I am afraid that you'll have to see for yourself to understand why what you wrote is both true and not very applicable to APL.


This is indeed part of what I meant to see before in this thread; it is very hard to convince people, who are kind of biased already by the syntax and the 'old age' of the language, to just try it out for a while. It's the same issue with Lisp/Scheme; if you do wrestle through Common Lisp: A Gentle Introduction and/or SICP, you'll see things in a different light, probably forever and for the better. But it takes (a lot of) effort and if you are biased against something from the start, that's not going to stimulate you much.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: