this post was submitted on 02 Feb 2024
22 points (100.0% liked)

Programmer Humor

32461 readers
466 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 9 months ago

It got them back in 1.18. Not every project and library has upgraded to that yet but at least modern tools have generics.

Things were done the Go way, with specific implementations. You had maps, slices, and arrays, and those were all the generics in the language. Supplement the lack of generics by stuffing functions using generics into interfaces and then implementing those interfaces for every type you need to call the function on.