On 18 feb 2015, at 13:35, Martin Nowak via dmd-beta <[email protected]> wrote:
> The other problem is an unfortunately inevitable backwards incompatibility > introduced by making synchronized nothrow. > Vibe.d is one of the few programs that inherit from core.sync.* > classes which now have nothrow lock/unlock methods. Tango has the same problem. > This should be understood as a lecture, how bad an idea it is to allow > deriving from a class as part of the public API. It creates the strongest > possible coupling with little to no chance for ABI compatibility. Yeah. Classes and methods need to be designed to be overridden. There’s a book, Effective Java (similar to Effective C++), which recommends all methods should be final unless explicitly designed to be virtual. That’s also a reason why, at least in Eclipse code, there are interfaces with a “2” appended because they couldn’t afford to break backwards compatibly by changing an existing interface. -- /Jacob Carlborg _______________________________________________ dmd-beta mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-beta
