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

If you're not the only one then you can all meet up in a month and each point out bugs in the other n-1 implementations.


Does a set do so much that you'd be worried about doing it wrong? Not to say having it in a common mature library wouldn't be an advantage, but it's something I'd be pretty sure I could implement and get right the first time.

I'd be more worried about having two programmers write two implementations in the same project with subtly different interfaces, and having different parts of the code use each one. This is a cost and maintenance problem, but that's also a social and communication problem common to all projects.


Yeah, I was exaggerating a bit, but yes I think there could be room for bugs depending on what more involved operations are offered beyond basic membership tests.

Anyway, have you seen the map[T]struct{} idiom for Go? Decent enough for the basic case.




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

Search: