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

Re: Rather, DSSLs increase modularity, productivity



> From: Robby Findler <robby@cs.uchicago.edu>
> Date: Mon, 17 Nov 2003 21:53:47 -0600
> 
> At Mon, 17 Nov 2003 22:23:41 -0500, Christopher Barber wrote:
> > No, in Java's version of generics the checks are still done at runtime; 
> > the compiler just generates them for you.
> 
> I'm no Java expert, but from what I'd understood, this is false. This
> web page also seems to indicate that generics are statically checked:
> 
>   http://developer.java.sun.com/developer/technicalArticles/releases/generics/
> 
> but it isn't a technical spec, clearly.
> 
> Robby
> 

I believe that they're statically checked for correctness, but the generic types
are removed when translating to bytecode, so a runtime cast (which will
always succeed) still has to be performed.

Mike