From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2428 invoked by alias); 6 Jan 2010 13:58:03 -0000 Received: (qmail 2413 invoked by uid 22791); 6 Jan 2010 13:58:01 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-fx0-f209.google.com (HELO mail-fx0-f209.google.com) (209.85.220.209) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jan 2010 13:57:57 +0000 Received: by fxm1 with SMTP id 1so15870741fxm.16 for ; Wed, 06 Jan 2010 05:57:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.239.185.206 with SMTP id d14mr479832hbh.150.1262786274501; Wed, 06 Jan 2010 05:57:54 -0800 (PST) In-Reply-To: <4B448A9B.2060306@redhat.com> References: <898285d31001060337led8a851g4f20437fabe5d734@mail.gmail.com> <4B447C24.2010603@redhat.com> <17c6771e1001060459p6a584128ye5d9b8c3e11a7794@mail.gmail.com> <4B448A9B.2060306@redhat.com> Date: Wed, 06 Jan 2010 13:58:00 -0000 Message-ID: <17c6771e1001060557m4422dbf2j296aedffd6e6d7b0@mail.gmail.com> Subject: Re: libgcj 3.4.6 vs 4.x.x From: Andrew John Hughes To: Andrew Haley Cc: java@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg00012.txt.bz2 2010/1/6 Andrew Haley : > On 01/06/2010 12:59 PM, Andrew John Hughes wrote: >> 2010/1/6 Andrew Haley : >>> On 01/06/2010 11:37 AM, abhishek desai wrote: >>>> Is there any documentation about the enhancements in gcj/libgcj >>>> between versions 3.4.6 and gcc version 4.x.x ? I tried to compare the >>>> changelog but it did not help much as the changelogs are of two >>>> different versions. >>> >>> It's mostly just better and better coverage of the language. >>> >>> The key difference was gcj 4.3, which bumped the spec to 1.5, bringing >>> annotations and templates. >> >> Templates? What are templates? > > No smiley? Yeah, sorry, forgot the smiley... :-) there we go > > OK, generics then. =C2=A0Same thing. =C2=A0More or less... =C2=A0:-) The main difference is that Java generics are type-checked (though not at runtime because there's no reification), while I believe C++ compilers generate the required type-specific code from the template. I know it can lead to confusing compiler error messages in C++ code when there is a problem in code that was generated from the template by the compiler. I was corrected for making the same comparison a long time back when I first started working on Classpath (though not by you). So couldn't resist the temptation of pointing out they aren't the same ;-) gcj 4.3 also adds enumerations from the 1.5 language specification, and, most notably, moved away from its own compiler to using ecj to compile all this 1.5 stuff. You need 4.3 as a minimum to bootstrap OpenJDK via IcedTea. > > Andrew, > who has perhaps been writing C++ too much. > --=20 Andrew :-) who tries to avoid writing C++ whenever possible Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8