Open
Description
Is less verbosity the only main benefit of typeclasses over just inputting a set of functions?
Typeclasses can do where bar
is a member of Function
:
foo(x: A) where Function<A>
bar(x)
Without typeclasses we could do:
foo(x: A, y: Function<A>)
y.bar(x)
I understand @keean proposed other functionality for the where
clause, but as for the main functionality of providing pluggable (i.e. dependency injection) interfaces, what is the big benefit that justifies creating a new language?
Metadata
Metadata
Assignees
Labels
No labels