Intriguingly, Haskell has *three* exponentiation operators to ensure everything is type safe:
miniblog.
Related Posts
I'm looking at adding bitwise AND and OR to my programming language. Do I add & and | operators, methods x.and(y) or a library bitwise::and(x, y)?
My inclination is to add infix operators (concise and familiar) but syntax is such precious real estate.
I've been writing docs for different programming language operators (+, *, == and so on). Each one gets a separate web page.
I've suddenly realised that / is much harder! docs/+ and docs/== is fine, but docs// just doesn't work as a URL in a static site.
Any ideas?
I'm adding a += operator to my programming language, because writing `x = x + 1` is tedious.
This opens the tricky design question of which operators should support this. Is += and -= sufficient, or do you expect things like >>= and **= to be available?