3 ms·
You mean like final in Java? I don't believe there is. Go has a different way of handling OO and so far I have never needed "final". In Go embedding is not comm
by voidlogic 14y ago
You mean like final in Java? I don't believe there is. Go has a different way of handling OO and so far I have never needed "final". In Go embedding is not common and interfaces are used much more.
In Go, having final in an embedded struct affect the containing struct seems wrong IMHO- this would allow embeded fields to dictate the behaviour of things that embed them. I don't think most programmers would be happy with adding a field to a struct and as a consequence be prevented from implementing a given method signature.
- shared4you 14y agoAh sorry, I have no idea about Java or final, so ... can't comment.
- voidlogic 14y agohttp://en.wikipedia.org/wiki/Final_%28Java%29#Final_methods http://en.wikipedia.org/wiki/Final_%28Java%29#Final_methods