News for hackers. Stuff that matters.
Re:Brad Fitzpatrick on the future of Go by charlieflowers on Tuesday October 14, 2014 @03:36PM (#8455274)
The ability to use type parameterization to create a type with one or more "holes" in it that is filled in at declaration time. For example, a type that is a List of ints would often have almost exactly the same code as a type that is a List of strings. But without generics, you have to write it twice (or copy/paste, use code generation, etc.) With generics, you say "List<T>", and the compiler makes it work for both List<int> and List<string> (and pretty much any other type you substitute for T). (There are various ways of making it work under the compiler can use under the hood).

There are no comments on this comment yet.