Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Use Interfaces
Message
 
To
09/01/2008 20:25:00
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01278205
Message ID:
01280765
Views:
31
>I wasn't going to bother replying to you anymore, as I know other's feel this way also. But this last comment is flat out wrong, laughable at best.
>
>"there are better ways, like using collections to store which class is edible for which class, etc."
>
>You've obviously not coded in dotnet or java. As everyone has said, Interfaces are a great way to enforce good coding standards. I've not ever, ever seen a situation of spaghetti code arising out of use of interfaces.


Well, I think this will be my only reply to you too, as is a waste of time for you are an arrogant person who obviously do not understand Doru's point and you hide in personal attacks instead of answering his questions straight, which are not only valid but true, even if I disagree with his example, but you, not very graciously, ignored to answer his questions. Ah, in fact, I have also a hard time imagining why you need an interface in that example (other than the need for them in typed languages maybe?) or even why this is a good example of using interfaces to simulate MI, which, again, is the key of the matter, so I would love to see the person who proposed it to show how would he do it, at least Doru is trying to answer.

First, dotnet is not a language, for you can not "code" in dotnet and you can make use of MI directly with some of the "dot net languages" without the need of using interfaces.

Second, the discussion is about concepts, so the languages are irrelevant. You claim that interfaces are a way to enforce good coding standards, and I also happen to think they are great, but they hardly enforce a good design, that is the key of the question, in fact many of the great advantages of the interfaces have nothing to do with good design, but to overcome "limitations" (in quotes for I know is not the right word) of the language, i.e to allow polymorphism in non-dynamic languages (for example you do not need to use them, in fact the concept of interfaces as we are discussing here is newer than the language itself, in a pure OO language like Smalltalk, so in your view I guess it is impossible to have a good design in said language, of course you pay a price too, like Rick said) and ah! or to simulate MI, forgot what started this all

Third, it seems that you still not understand that Doru is not arguing about interfaces but about MI but of course he is not discussing any of the other great advantages of Interfaces, did you read him saying anything about being worthless to enforce contracts or please can you point me where did he said that the use of interfaces leads to spaghetti code? He said, or at least is what I understood, that the use of interfaces to simulate MI CAN lead to spaghetti code, which is a far cry from what you are saying he said.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform