2 ms·
Don't make "operators" a special case - make them just functions following the normal rules. Scala gets close to this (though sadly it still has some operator p
by lmm 3y ago
Don't make "operators" a special case - make them just functions following the normal rules. Scala gets close to this (though sadly it still has some operator precedence rules). To define a function called "plus", you do "def plus" (or "fun plus" or whatever your syntax is). To define a function called "+" you do "def +". It's so much nicer and more consistent. Yes, some library authors abuse it to write functions or classes with dumb names, but you can write dumb names with letters as well.