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

There’s also option C which is better than b (but still awful) which is to write a method that takes two interface{}s and uses reflection to figure out their concrete types at runtime and merged them. No type safety, unidiomatic, decently ergonomic (assuming you panic on type errors), and probably reasonably performance for large slices.


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: