News for hackers. Stuff that matters.
Re:Crystal 1.0 – What to expect by mekkkkkk on Tuesday March 23, 2021 @07:25AM (#26553718)
The main benefit of generics is to easily maintain strong type information for implementers.

With a

  <T>createMapWithStringKey(T arg) -> Map<string, T>
You can keep strong type info with

  AType a
  var b = createMapWithStringKey<AType>(a)
  // b is for certain a Map<string, AType>

There are no comments on this comment yet.