News for hackers. Stuff that matters.
Re:State Machines in Go by amourdezombi on Sunday February 10, 2013 @01:17PM (#5197220)
One thing that hasn't been articulated in the recent HN articles about Go: method sets can be defined for _any_ type, not just structs.
Re:State Machines in Go by mseepgood on Sunday February 10, 2013 @03:56PM (#5197864)
Yes, you can even attach a method to a function type.
Re:State Machines in Go by dsymonds on Sunday February 10, 2013 @06:34PM (#5198453)
Any named type. You can't stick a method on []string; you have to name it first, then add methods to its name (T or *T).