heard arguments pro and con regarding using interfaces in the place of base classes.
what sayeth ya'll
Printable View
heard arguments pro and con regarding using interfaces in the place of base classes.
what sayeth ya'll
Using interfaces in place of base classes? That makes no sense. They both have appropriate uses and one should not be able to "replace" the other otherwise your design is wrong.
Interfaces have a specific use. Base classes have a specific use. Sure you can use a base class in a similar fashion to an interface but if you don't need the benefits of the base class then it's pointless and counter-intuitive.
I'm with kasracer - got any links that you have read pros and cons on. I wouldn't mind reading them just to see what they have to say, and how a case could be built that it should ALWAYS be one or the other.Quote:
Originally Posted by DirtyHowi
And you should add an "Both serve a purpose" option to your poll.
Yeah, where's the "Use the right tool for the right job option?"
-tg
Are these the same people that often pick up a patterns book, pick one at random, and wedge an application design around it just for the sake of using the pattern?Quote:
Originally Posted by DirtyHowi
It's like arguing whether a hammer or a screwdriver is more useful.
Depends on how big the butt of the screwdriver is.Quote:
It's like arguing whether a hammer or a screwdriver is more useful.
I'm with everyone above on this! I can't make a vote as each has their own use and value depending upon the task/section at hand.
Mendhak - "Golden hammer" anti-pattern comes to mind!!! :D