begin  quoting Christopher Smith as of Sun, Jun 10, 2007 at 12:00:46AM -0700:
> Stewart Stremler wrote:
> >Generics changed that. Java is becoming C++ like.
> >  
> I've heard a few Java people say as much, and I find it bizarre. I guess 
> it is C++ like in that you have a little bit of type theory in there and 
> it uses <> symbols,

No, it's because when you read up on Generics, you get an explanation
peppered with "you'd think X, but suprisingly, this isn't the case", and
then it goes off to provide a very logical reason why the language can't
do what you'd expect it to do.

It's violating the principle of least suprise.

It's exactly like reading about many C++ features. At least to me.

>                     but frankly Java without generics just had this huge 
> gaping eyesore of a problem in its type system,

Never bothered me. Bothered some of my collegues, but I figured that
if you're passing around raw collections, you're writing poor OO code
anyway, so why worry about it.

All I wanted was covariant return types.

But now I read that you're not supposed to use those... Wah!

>                                                 and the solution they 
> come up with borrows much more from Ada than C++.

It's not the source of the change that gives it the C++ flavor... it's
the very logical reasons to justify something in the language that leads
to WTF?! moments.

C++ is a very logical language. Ever annoying, obnoxious, or stupid
thing in the language is justified by a rational and logical reason,
considering everything else the language does.

"Wouldn't it be neat if..." is a poor design aesthetic.

>                                                   Honestly, if they 
> could just generalize what they did with the "synchronize" keyword a bit 
> more, the language might turn out to be halfway decent.

It already was halfway decent.

Had they put the thought they put into "synchronize" into generics, they
hopefully could have come up with something less obnoxious.  Or decided
that it wasn't important (like multiple inheritance).

I don't want a one-language-fits-all-problems language. It just results
in a language that is equally unpleasant for all problems...

-- 
I have more than one screwedriver in my toolbox. And more than one toolbox.
Stewart Stremler

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

Reply via email to