Comment by MrBuddyCasino
3 years ago
Lots of programming isn't math or logic, its shovelling data and manipulating strings. Is APL good at that?
3 years ago
Lots of programming isn't math or logic, its shovelling data and manipulating strings. Is APL good at that?
If a string (or a file or whatever) is "just" an array (of bytes; characters, again: whatever), then yes.
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.
4 replies →
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.
1 reply →