Skip to main content
9 events
when toggle format what by license comment
Jul 14, 2014 at 18:15 comment added Telastyn @supercat - that might be not an ideal scenaio, but personally - collections should have a Count on their interface, regardless of implementation. I don't see how interface segregation impacts that. Collections should also have an AddRange, regardless of implementation. That implementation may have specializations for OrderedCollections or Sets, but that's implementation again - not interface.
Jul 14, 2014 at 17:10 comment added supercat ...and implement them efficiently when used with base classes that can do so. If one aggregates a ten-million item list which knows its count, and a five item list that can only retrieve items sequentially, a request for the 10,000,003rd entry should read the count from the first list, and then read three items from the second. Kitchen-sink interfaces may violate the ISP, but they could greatly improve them performance of some composition/aggregation scenarios.
Jul 14, 2014 at 17:06 comment added supercat What about integration segregation vs. the efficient design of aggregates? If the basic "sequence" interface [e.g. IEnumerable] includes methods like Count and asImmutable, and properties like getAbilities [whose return would indicate whether things like Count will be "efficient"], then one could have a static method which takes multiple sequences and aggregates them so they'll behave as a single longer sequence. If such abilities are present in the basic sequence type, even if they only chain to default implementations, then an aggregate will be able to expose those abilities...
Jun 25, 2014 at 11:45 vote accept MetaFight
Apr 8, 2014 at 16:43 comment added Ben Lee I agree. I think the correct principle(s) to follow clearly depend on the situation, but aside from hard performance requirements, which always rank above everything else (this matters especially in game development), I tend to think DRY and KISS are usually both more important than SOLID. Of course, the more clean you make the code the better, so if can follow all the principles without conflicts, all the better.
Apr 6, 2014 at 21:17 vote accept MetaFight
Apr 6, 2014 at 23:56
Apr 4, 2014 at 23:36 comment added user949300 +1 When I just looked at the SOLID principles, I see 5 "nice to haves". But none of them top DRY, KISS, and "make your intentions clear". Use SOLID, but show some caution and skepticism.
Apr 4, 2014 at 20:20 comment added FrustratedWithFormsDesigner I like but sometimes other things are more good. It has an "Animal Farm" feel to it. ;)
Apr 4, 2014 at 19:13 history answered Telastyn CC BY-SA 3.0