libgcj 3.4.6 vs 4.x.x
Andrew John Hughes
gnu_andrew@member.fsf.org
Wed Jan 6 13:58:00 GMT 2010
2010/1/6 Andrew Haley <aph@redhat.com>:
> On 01/06/2010 12:59 PM, Andrew John Hughes wrote:
>> 2010/1/6 Andrew Haley <aph@redhat.com>:
>>> 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. Same thing. More or less... :-)
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.
>
--
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
More information about the Java
mailing list