News for hackers. Stuff that matters.
Re:Another go at Go failed by tomp on Wednesday January 08, 2014 @08:46AM (#7023387)
No, only that in Go it's impossible to abstract the code that implements the "set union" functionality into a function.
Re:Another go at Go failed by Roboprog on Wednesday January 08, 2014 @11:19AM (#7024423)
I'm going to disagree:

    new_set = old_set.union( another_set, element_comparator_func);
If you allow some helper functions or an interface to do things such as compare/hash members, it's totally doable. Extra points for passing the helper(s) into the constructor.

Yes, you can still mismatch set types, but the casting/type-assertion in the helpers will fail with an explicit reason.

Re:Another go at Go failed by Roboprog on Wednesday January 08, 2014 @11:17PM (#7028731)
Almost forgot: in Go, classes aren't "closed". While you cannot "monkey patch" and change existing methods, you can define new functions, such as my_set_comparator, that accept each given type as "this". You would then make a new interface, such as my_set_element, which defines method my_set_comparator, and any data types for which you had defined my_set_comparator would automagically meet the new interface.