|
|
|
|
|
by suchabag
3219 days ago
|
|
> Authors of Go wanted to give users more flexibility by allowing them to add their logic to any structs they like. Even to the ones they’re not authors of (like some external libraries). Except that you can't. "You "cannot define new methods on non-local type[s],". You have to compose them.
That makes the struct function definition syntax a bit moot in my opinion. |
|