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

The built-in types slice and map are type-safe and cover 90% of container needs. If you want to use a non-builtin container such as container/heap and you find yourself casting too often, write one or two little wrapper functions for your use case, which encapsulate your casts. This is also an opportunity to make the wrapper represent the problem domain better.


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

Search: