Hacker News new | past | comments | ask | show | jobs | submit login

> Although it's far from certain, after over a decade of work it looks like a design for parametric polymorphism, what is colloquially but misleadingly called generics...

What exactly is misleading about generics?

The psychology of thought leaders is fascinating. The term generics is colloquially understood to mean parametric polymorphism and here's Pike redefining the term to draw some distinction that doesn't really exist just to remain self-consistent.

Come to think of it, this is a really common pattern. If you've made remarks that you must now backtrack then refine terms until your old writing doesn't seem to contradict your current stance because you can just say people were using the terms wrong and you were right.

Some results for searching "generics": https://docs.microsoft.com/en-us/dotnet/csharp/programming-g..., https://www.typescriptlang.org/docs/handbook/generics.html, https://docs.swift.org/swift-book/LanguageGuide/Generics.htm..., https://doc.rust-lang.org/rust-by-example/generics.html. If you search for "Wadler generics" then a book about generics in Java is the first result: https://www.amazon.com/Java-Generics-Collections-Development....




This is probably just age. I had two CS professors, one in the late 90s and the other around 2004, draw a similar distinction.

"Parametric polymorphism" was the "whole" feature, while "generics" meant specifically generic containers, usually wholly agnostic about their type parameters, like std::map or std::list. Since the rise of Java Generics (which are really somewhere in between, more than containers but less than full parametric polymorphism) I don't hear this distinction anymore.


You know, Pike was at Bell Labs for a few decades when it was the premiere computer science research place on the planet. It's possible that he has a more technical definition of generics in mind here. (Or he could be being evasive. What's quite unlikely is that he doesn't know the real definition of generics.)


(Also, once Rust gets specialization, our generics will no longer be parametric.)


I don't think Go's proposed system is parametric either. It's not clear to me how their contracts actually map to generics so I have no idea if Pike is telling the truth or just "thought leading".




Applications are open for YC Summer 2021

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: