Jeff Koftinoff

Jeff Koftinoff jdkoftinoff

Niner since 2012


  • Inheritance Is The Base Class of Evil

    I found that Sean did pretty much the same presentation before, and the source code for that one is on github here: 

    Sean, is there any difference in the code now? And thank you for the great presentation!

  • Day 1 Keynote - Bjarne Stroustrup: C++11 Style

    @Ray: The problem with that approach becomes when your 'controller' needs to do something a bit more complex and needs the target object's state to decide what to do or needs to notify the target object to do something else upon a change.

    In my experience I've found those cases the primary cases where I actually needed getters and setters.

    So then in that case the Property class template needs to change to be able to contain a controller object which then holds a reference to the target object ( 'Man', in this case ), and the Controller then can not use static methods.  

    But then here is the bloat added.

    So I like Darren's new proposal best - if they are logically publically available properties just leave them as public member variables.  

    In the future, when you realize that you need something more complex, either make them private and add getters and setters and modify the client code, or make a decorator that allows the assignment operator to work with them which calls the real getters and setter behind the scenes.