Hacker News new | ask | show | jobs
by initplus 1776 days ago
The trouble in Haskell is that an operator like %%@~ is just an arbitrary name.

In languages like K or APL, the combination of symbols is the actual definition.

3 comments

As APL shows, you then need quite a large alphabet of symbols, though.

But I'm not strongly in either camp. A few common branches of mathematics taken together have quite a large alphabet of symbols, too, and we work well with it. It feels like symbolic notations can seem obtuse at first and be hard to get into, but once you're used to it the alternative may appear worse.

> As APL shows, you then need quite a large alphabet of symbols, though.

I count 71, which doesn't seem like a lot.

That's more than key-words in most languages, I think.
Quick'n'dirty wetware lookup:

Go: < 30

C: ~ 31

C++: > 70

Python builtins (not even keywords): 68
lens operators in haskell at least have some structure https://news.ycombinator.com/item?id=28124226
how is "%%@~" different from, say, "°"? Since they're both designed to be contentless, couldn't you form a bijection between them without losing anything? (And if your objection is atomicity, how do you feel about "%" and "°"?)
The premise here is wrong, because lens operators are very much designed to carry meaning. See my sibling comment (parent->parent->sibling, I guess), but operators with `@` operate on indexed optics, and the leading `%%` means "modify, and collect summary".