Stewart Stremler wrote:

>"On the one hand, it's really powerful, and cool, and nifty. It lets
>you do all sorts of amazing things.  On the other hand, it's trivially
>abused, makes code hard to read, harder to understand, and very difficult
>to debug trivial errors analytically."
>  
>
That's not exactly a fair characterization of operator overloading
though. If used properly, it can make code easier to read, easier to
understand and easier to debug analytically (not to mention easier to
write).

>Not all design decisions have no right answer.
>  
>
I guess that's true. Things like "require all variable names to begin
with 'yggdrasil'" are probably just a flat out dumb ideas. The ones that
have earned a term in the language designer lexicon tend to be trade
offs though.

>>>>4) multiple inheritence
>>>>        
>>>>
>>>Toss-up.  I find that the more programming experience I get, the less I
>>>use inheritance, period.  IsA generally isn't.
>>>      
>>>
>>I agree that multiple inheritance is, in general, a trade off that is
>>questionable. I'd also agree, that there are a lot of languages where
>>unfortunately a deep hierarchy does more harm than good (and I'd put
>>both Java and C++ in that boat). My point is merely that combining
>>multiple inheritance with these other features allows a unique and
>>useful capability.
>>    
>>
>
>Interfaces + composition do the same job, at the cost of a little more
>code (and a consequent minor performance hit).
>  
>
No, unfortunately not. In that case a lot of the policy logic gets
encoded in the "glue" between the aggregate and its components, and it's
non-trivial to discern that logic with a quick glance at the class
definition.

>>>That I might agree with.  However, have the new generics in 1.5
>>>addressed this for you?
>>>      
>>>
>>No, they are severely crippled.
>>    
>>
>
>I'd like to hear your take on that.
>
>(So far, I just dislike the syntax. Haven't had a chance to play with
>it much beyond that.)
>  
>
The syntax kind of sad mostly because before generics Java was very easy
to read (maybe not Python level, but then again I've seen Python code
that was pretty horrid). Another one of those design trade offs. ;-) The
inability to use generics on static fields really limits the scope of
what you can do.

--Chris

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to