|
|
|
|
|
by dhagz
2120 days ago
|
|
A decent chunk of new Go developers are former Java developers. (I'm not being disparaging here, I came over to Go from Java!) I think the idea of "accept interfaces, return structs" doesn't sink in very well and isn't as readily apparent as it could be. When I have a function that takes a struct, and I need it to take a different struct for the same argument due to whatever, that to me screams "make an interface", but I hadn't been programming Java very long before my team started using Go - I've now been writing Go professionally longer than I have Java. |
|