Hacker News new | ask | show | jobs
by grg0 295 days ago
It's not a comparison either. OP's statement is just wrong; the obvious meaning of = is equality. For the definition of a pure function, = is the obvious symbol to use since the RHS can be substituted in for the LHS in any context.

-> for definition is just annoying. On every keyboard layout, it takes two strikes to type, possibly with shift involved.

3 comments

Use ≟ for comparison. I don't know where to find it on my keyboard, though. Maybe language designers should invent a keyboard along with their language.
Yes. I too thought it was this. It is equality, and thereby lets you rewrite one side into the other side.

Then again I quite like rewriting languages like Mathematica and lean

Equality is a comparison.
Not in the sense of evaluating to a boolean.