Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So if generics in java don't do anything beyond 'get typechecked, and insert implicit casts.' the empty interface is enough for all use-cases in go?


Yes, in a sense that structured loops don't do anything beyond inserting implicit if/goto, and so the latter is enough for all use-cases.


1. the empty interface does not do the first one, and thus does not allow writing typesafe structures and code

2. and it requires significant expense of explicit casts which are not just sanity checks (which is what they are in java, due to type system weaknesses)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: