2 ms·
By "classes are open" you mean that you can add methods to classes at will by just implementing a func with the right receiver? In that case they're not truly
by unscaled 10y ago
By "classes are open" you mean that you can add methods to classes at will by just implementing a func with the right receiver?
In that case they're not truly open: Go does not allow you to declare methods on receivers from other packages, which means you can't extend anything which wasn't written by you. Which makes open classes almost useless.