gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: [OT] Java is fun


From: zander
Subject: [Gnu-arch-users] Re: [OT] Java is fun
Date: Fri, 24 Oct 2003 07:06:52 +0200

On Thu, Oct 23, 2003 at 10:14:16AM -0700, Tom Lord wrote:
> Yes, that's true of typical implementations of C but there's some
> differences from the language design perspective:
> 
> 1) C doesn't _require_ (does it?) that the linker not perform that
>    type check.  I could define an object format and linker that would
>    perform it and still have a standard-conforming C implementation.
>    
>    Java _requires_ that the linker not perform the exception check.
>    There isn't even enough information in class files to permit
>    a link-time check, and, unlike C, a single standard "object file"
>    format is an important part of how the language is supposed to be
>    used. 


If you use unchecked exceptions (the ones you don't have to put in your
throws line) this is even more true.
I can create a new exception, make it unchecked and throw that from any
library method I want, without a compiler making any fuss about it.

Notice also that C# uses _only_ unchecked exceptions.

-- 
Thomas Zander

Attachment: pgpZFTHrpW7xq.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]