Comment by hu3

2 days ago

You cherry picked a contrived example but that's one of the cleanest generics implementations.

Now imagine if it had semicolons, ->, ! and '.

> 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?

  • He 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.