News for hackers. Stuff that matters.
Re:Go generics are not bad by Quekid5 on Friday July 08, 2022 @07:25PM (#32029244)
Type erasure is interesting. It turns out that not doing type erasure (combined with instanceOf-like things, like pattern matches on type parameters) breaks parametricity. Parametricity is a very powerful reasoning tool.

Of course, type erasure isn't the actual culprit in that case, but once you don't do it, it gets very tempting to allow pattern matching on type parameters...

Re:Go generics are not bad by Gibbon1 on Saturday July 09, 2022 @12:50AM (#32031820)
I read an essay by a CS post doc taking about type erasure. He said getting to the point where you can do type erasure is golden. And then everyone makes the mistake of actually implementing type erasure. He said you consign yourself to no tooling and terrible debugging.
Re:Go generics are not bad by juliangamble on Friday July 08, 2022 @08:12PM (#32029825)
This.