|
||||||
Readers Respond to "Is Inheritance Overrated?"I've received some good feedback from my article, "Is Inheritance Overrated?" The real issue, it seems, isn't inheritance, but rather strong typing. One of the requirements of this project is that it be more or less self-maintaining: new content types will be added fairly often; my bosses don't want me to have to go spelunking in the code every time that happens. An advantage of my generic framework is that the app's users can maintain the system simply by creating templates and editing data; few (if any) changes to the underlying code will be required. David Bayley thinks the generic framework will be more difficult to maintain than a strongly-typed object model. What do you think? Comments
Post a comment
|
Presentations
Create Great User Interfaces
Articles
Easy RSS in VB.NETIs Inheritance Overrated? A Tale of Tabbed Pages Categories
.NETBlog Career Cycling Geek Humor Microsoft Music Personal Rants Reading Software Tech Usability VB Archives
March 2008December 2006 August 2006 April 2006 February 2006 January 2006 December 2005 September 2005 June 2005 May 2005 March 2005 January 2005 December 2004 September 2004 July 2004 June 2004 January 2004 August 2003 July 2003 May 2003 April 2003 March 2003 February 2003 January 2003 December 2002 November 2002 Misc
Talk to MeSubscribe |
|||||
I've been doing OO development since 1989 with a variety of languages and I came to the conclusion years ago that strong-typing is VERY BAD and VERY non-OO (particularly at the design stage and when dynamicism and flexibility are required).
People don't want strong typing as we know it, they want strong typing of the public interface. You don't care (or you shouldn't care) whether something is an integer (or whatever), you just want it to respond to a set of messages (in this case maybe the set of messages that an integer responds to).
Truth of the matter is, if everything is an object, then everything is of the same "type" and just needs to respond to a specific public interface.
This is hard for hard-core C++ people (and those people that "inherit from" C++) to accept. I spent several years doing C++ but it wasn't until I branched out into other (and better) OO languages did I achieve a full understanding.
Anyway, there are places for inheritance and places for composition/aggrigation/delegation but this is completely separate from any discussion of strong typing.