Linked by Thom Holwerda on Mon 11th Feb 2013 22:59 UTC
Thread beginning with comment 552366
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[8]: My thoughts on Go
by lucas_maximus on Wed 13th Feb 2013 21:19
in reply to "RE[7]: My thoughts on Go"
RE[9]: My thoughts on Go
by satsujinka on Wed 13th Feb 2013 22:33
in reply to "RE[8]: My thoughts on Go"
If you use interfaces as a primary means of tagging your objects then, yes you can't do that in Go.
However, interfaces aren't just a means of saying this object can do this, that, and the other. The methods of an object do that just fine; there's no need to be redundant. Instead, Go uses interfaces as a contract. If I need a Reader then I'm going to be using a Read method. Which object this is doesn't matter.
I commented on this earlier, but Go's interfaces are backwards in comparison to most others. It's not the object that implements an interface, but the interface that defines an object.
RE[8]: My thoughts on Go
by moondevil on Thu 14th Feb 2013 07:47
in reply to "RE[7]: My thoughts on Go"
Rename still isn't as flexible.
For example, in Go if you are using someone else's objects, you can still create interfaces that those objects implement, without needing to modify those objects (you don't even need their source code.)
For example, in Go if you are using someone else's objects, you can still create interfaces that those objects implement, without needing to modify those objects (you don't even need their source code.)
Ever heard of adapter pattern or expression problem?
RE[9]: My thoughts on Go
by satsujinka on Thu 14th Feb 2013 18:42
in reply to "RE[8]: My thoughts on Go"





Member since:
2010-03-11
Rename still isn't as flexible.
For example, in Go if you are using someone else's objects, you can still create interfaces that those objects implement, without needing to modify those objects (you don't even need their source code.)