4 ms·
You cherry picked a contrived example but that's one of the cleanest generics implementations. Now imagine if it had semicolons, ->, ! and '.
by hu3 10mo ago
You cherry picked a contrived example but that's one of the cleanest generics implementations.
Now imagine if it had semicolons, ->, ! and '.
- mrkeen 10mo ago> You cherry picked a contrived example List.add is contrived? What are you doing that's simpler the list.add? > but that's one of the cleanest generics implementations. You're saying it's typically worse than this?
- gethly 10mo agoHe is referring to &element[T]{val: v} the & is a pointer, which is common across most languages, but the [T] is a dynamic type T. Otherwise it would be just &element{val: v} He says that element[T] is a clean/simple implementation of generics.