3 ms·
implicit parameters of generic traits (aka the typeclass pattern) have everything to do with how Scala's generics can be used in more powerful ways than C#'s. A
by whateveracct 11y ago
implicit parameters of generic traits (aka the typeclass pattern) have everything to do with how Scala's generics can be used in more powerful ways than C#'s. And they are 100% tied to Scala's generics. Generic types in Scala can be used in implicit search kick off inductive generation of type-safe code.
If you literally just mean generics at runtime, they are no different than Java's, outside of support for specialization for primitive types.
> Perhaps the OP was referring to the type system instead?
Generics and the type system are pretty much the same thing? They only matter and have true power at compile time regardless of your language. So the fact that Scala's generics have absurd power at compile-time (way more than anything in C#) is 100% relevant.