News for hackers. Stuff that matters.
Re:Go Replaces Interface{} with 'Any' by valenterry on Tuesday December 14, 2021 @08:34PM (#29560899)
> I thought that using an empty interface to represent "any type" was kind of ingenious

It makes me a bit sad to read that. We all are on a journey to be become better developers every day. But things like that are like a distraction. They make you think you found a really cool and smart concept, but you actually didn't and it's essentially just a hack.

Not sure what the solution can be. But PL designers should be more clear about features that are just "hacks" and considered "bad" but necessary in practice due to certain constraints. Go's {} and nil-errorhandling are examples. Nulls (in any language) are another common example.

Re:Go Replaces Interface{} with 'Any' by laumars on Wednesday December 15, 2021 @02:38AM (#29563086)
That’s a very condescending way of say “I don’t personally like this feature”.
Re:Go Replaces Interface{} with 'Any' by the-alt-one on Wednesday December 15, 2021 @03:11AM (#29563246)
It's not a hack, it's the natural way of expressing it in the chosen type system. The use cases for interface{} are often hacks, because of a lack of parametric polymorphism, but that's different.