News for hackers. Stuff that matters.
Re:Iterators are (maybe) coming to Go by Groxx on Sunday August 13, 2023 @12:45PM (#37111582)
Func references can have methods as well fwiw :) They just need to have a named type.

But sure, if you want to build a multi-method thing (or upcast to detect optional methods), an interface is the natural choice - it's no longer a single func.

Re:Iterators are (maybe) coming to Go by throwaway073123 on Monday August 14, 2023 @03:24PM (#37125621)
Absolutely. If I see a one method interface, I generally assume that there's a ThingDoerFunc type that implements the interface.

Likewise, (ThingDoerImplemetation{}).DoThing is a valid func reference

Hence I say there's not really a one size fits all, there are a options for different circumstances.