Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: looking at generic



le 30/10/04 3:37, Dmitry Markman à email@hidden a écrit :

> 
> On Oct 29, 2004, at 9:27 PM, Rolf Howarth wrote:
> 
>>> What I love in Java is not having to care about memory, and also being
>>> always sure my exceptions are handled. This doesn't mean I should
>>> give-up on
>>> some great tools I have in C++.
>> 
> 
> I think you definitely have to think about memory in Java
> otherwise you'll get Out of memory exception
> 
> and you have to help to the GC if your application
> needs memory
> 
> there are many classes that require explicit freeing memory
> and Graphics is one of them
> so don't forget about memory :-)
> 
> 

By the way, I wrote this, not Rolf.

What I meant is that in C++ I need to care about memory ALL THE TIME (am I
leaking memory ? can I safely dispose this object ?), while in Java I only
have to care about memory usage (which I also have to care about in C++).

And I LOVE the fact that in Java, the compiler tells me what exceptions I
should care about, because I LOVE exceptions.

And I also LOVE C++ templates, because they let you fix 50 bugs at once (if
you have 50 instanciations), and let you write clean code with no suspect
cast operators.

And I also LOVE C++ operators even if don't use them too much, because I
LOVE to write:

    obja = objb;

And

    if ( obja == objb)
        do something;

I don't see how the above could be confusing to anyone.

C++ has evolved since 1996 (stronger typing, explicit keyword...), and one
should make his opinion on the current state of the language and tools, not
what they were at that time.

Eric

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: looking at generic (From: Dmitry Markman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.