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

In a statically typed language, it shouldn't be necessary to break type safety to implement basic abstractions. The only thing interface{} provides over void* is safe typecasting.



In other statically typed languages you don't break type safety to implement abstractions.

In go, where interfaces are implemented by default and `interface{}` covers everything, you also don't need to. It's just a little bit (~6 lines) of code to add to guarantee it while they figure out a nice way to add generics.


Well that's not to be sneezed at, even though it remains crude.




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

Search: