Timeline for Is it bad practice to use an interface for categorization only?
Current License: CC BY-SA 3.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 14, 2012 at 12:42 | comment | added | Kendall Frey | Because (in this example) a dog kennel does not have snakes. | |
| Jun 14, 2012 at 9:32 | comment | added | Freshblood | Why do you need to seperate IDog and IAnimal ? | |
| Jun 14, 2012 at 9:31 | history | edited | Freshblood | CC BY-SA 3.0 | added 552 characters in body |
| Jun 14, 2012 at 6:48 | history | edited | Freshblood | CC BY-SA 3.0 | deleted 2 characters in body |
| Jun 14, 2012 at 6:12 | history | edited | Freshblood | CC BY-SA 3.0 | added 38 characters in body |
| Jun 13, 2012 at 23:53 | vote | accept | Kendall Frey | ||
| Jun 13, 2012 at 23:26 | comment | added | Kendall Frey | Let me describe it as I did in the comment on Telastyn's answer. e.g. I have a Kennel class that stores a list of IDogs. | |
| Jun 13, 2012 at 23:25 | comment | added | Freshblood | If you are using this pattern so you are higly doing reflectional jobs. I mean you are dynamicaly or staticaly doing type checks. I am sure you have something wrong in your use case but i haven't seen how you are using it. | |
| Jun 13, 2012 at 23:22 | history | edited | Freshblood | CC BY-SA 3.0 | added 51 characters in body |
| Jun 13, 2012 at 23:09 | history | edited | Freshblood | CC BY-SA 3.0 | added 131 characters in body |
| Jun 13, 2012 at 23:07 | comment | added | Kendall Frey | I'm confused. This 'Marker interface' pattern does provide compile-time checks, in that you can't pass a C to a method expecting an IDog. | |
| Jun 13, 2012 at 23:03 | comment | added | Freshblood | If you are using Marker Interface so you haven't got compile check benefit at all. You are basicaly doing type check by interface. | |
| Jun 13, 2012 at 23:00 | history | edited | Freshblood | CC BY-SA 3.0 | added 173 characters in body |
| Jun 13, 2012 at 22:58 | comment | added | Kendall Frey | Would attributes/annotations support compile-time checking (using C# as a reference language)? I know I could throw an exception if the object doesn't have the attribute, but the interface pattern catches errors at compile time. | |
| Jun 13, 2012 at 22:54 | history | answered | Freshblood | CC BY-SA 3.0 |