I need to know if my thinking is on the right track about something, and if so, what keywords I might Google search to find out more about this.
Are there times we write code and the real advantage is that by telling the computer what we won't be doing, it saves time because the computer doesn't have to do something (maybe saving milliseconds, or even more?)
For example, every discussion about the modifier 'abstract' explains how it will prevent me from accidently trying to instantiate an object from the class. Well, I'm in a situation where I'm pretty sure I won't make that mistake, but then I was thinking, well, maybe there's a better reason to use 'abstract' -- maybe it tells the computer 'you don't have to do certain stuff because this an abstract class' and it creates a significant time savings.
Am I on the right track?
The closest I've come to finding this was a mention that it's good to mark classes with 'sealed' whenever you know you won't be inheriting from them; this was in article about making code work faster.
Thank you for your help with this.
View Complete Post