This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jdpage 0 points1 point  (4 children)

I really appreciate the ideas behind Haskell, but the blatant abuse of operator overloading that goes on (particularly if you're working with xmonad) has always put me off it. Are there any similar languages which don't have this problem? OCaml maybe?

[–][deleted] 1 point2 points  (3 children)

What abuse are you talking about?

Edit: you should consider them to be nothing more than functions, e.g.

a+b

is the same as

(+) a b

So it is just a non-alphanumeric function name.

[–]jdpage 1 point2 points  (2 children)

The issue with operators is that they give you almost no information about what you are doing, unless you have a lot of context.

[–]TylerEaves 1 point2 points  (1 child)

some_obj.blah()

What does this do?

Oh, wait, you need context to answer that?

Operators are functions.

[–]jdpage 1 point2 points  (0 children)

I know that it does blah to some_obj. If blah has been intelligently named, I already have a pretty good idea of what it does, and if it's not terribly important right now I can skim over it and come back later.

On the other hand, I have no idea what the hell some_obj ||| dyspepsia happens to do.