3 ms·
I'm hoping that some system like Scala's implicit arguments or Agda's instance arguments could ease the burden of passing stuff around. I don't know if that's e
by cousin_it 12y ago
I'm hoping that some system like Scala's implicit arguments or Agda's instance arguments could ease the burden of passing stuff around. I don't know if that's enough for most realistic use cases, though.
There's another complication. For operations that make sense on only some types, it makes sense to pass around the implementation of the operations, because it also acts as a type constraint. But for operations that make sense on all types, like Java's equals/hashCode/toString (and possibly also comparison), I suppose it's better to make them overridable for each type, as a special case in the language.