Hot answers tagged

7

As Anders says, its partly about performance and partly about locking down poorly-thought designs down to reduce the scope of trouble caused later by people blindly inheriting things that were not designed to be inherited. Performance seems obvious - while most methods wont be noticed on modern hardware, a virtual getter might cause quite a noticeable hit, ...


6

There's two elements to your question, so I'll try and address them in turn: Why aren't .NET methods virtual by default? Inheritance, in practice, has many problems. So if it is to be used as part of a design, then it should be carefully considered. By making methods non-virtual by default, the theory is that it encourages the developer to think about ...


2

Because reducing the feature set of a language requires a compromise. Taking a feature out of the language means either: the language no longer has that feature, so people who need/value that feature will not want to use that language (aside: this is the reason I've never tried golang... while I like some of their ideas I find exceptions too useful to ...


2

I think layering is undervalued. I wish there were more texts talking about that as a design point. Layering means placing an abstraction on top of another abstraction (without allowing the underlying abstraction to leak thru). One great and highly effective example of layering is when you change languages. For example, you write some SQL on top of a SQL ...


1

Should we be thinking about a style of writing code that is better suited to the contemporary software design and architecture of being agile and user-centric (hence evolving faster compared to business requirements) that incorporates both elements of re-usability and also erasability? The underlying issue with the erasable versus extendable code is ...



Only top voted, non community-wiki answers of a minimum length are eligible