Chapter 6. Inheritance and Polymorphism Gotchas


Though you can gain a superficial knowledge of C++ in a couple of weeks, and become adept at it in a few years, an experienced C++ programmer would probably never claim to be a master of the language. Its complexities are mind-boggling. (I know people who have made career changes because of it.) More recent languages have eliminated a number of its tricky features and made it much easier to write good code. However, they have their own set of challenges. While they have taken a few steps forward on a number of issues, they have gone a few steps backward on some others. This can impact the extensibility of your code, break polymorphism, and make it harder for you to derive from your classes. Learning what these challenges are, and avoiding them or handling them judiciously, is imperative to effective development. In this chapter I will discuss the things you need to be aware of in the areas of inheritance and polymorphism so you can make best use of these important concepts.



    .NET Gotachas
    .NET Gotachas
    ISBN: N/A
    EAN: N/A
    Year: 2005
    Pages: 126

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net