|
|
|
|
|
by foldr
1089 days ago
|
|
To my mind, the issue is that a substantial portion of lifetime constraints reflect implementation details and not actual domain-level constraints that the programmer specifically wished to enforce. The same thing can of course happen with static type constraints generally, but I think not usually to the same extent. >Go doesn't have function level generics Not sure what you mean by this. Go functions can take generic parameters that satisfy a given interface (at compile time). E.g. func firstName[T AsBytes](name T) T
(You'd have to define the AsBytes interface yourself.)>in Java you cannot add a new interface implementation to a builtin type Yes ok, fair point. |
|