Smalltalk Type System

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Smalltalk Type System

joseaio
I think that optional Type System (as Strongtalk) must be interesting for Redline (and easy to implement thank you to Java Generics)

  What do yo think?
Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Type System

Robert Roland-2
Unfortunately, Java Generics are a compile-time function, handled by javac. We bypass javac by generating the byte code directly.

When javac sees List<String>, it checks all the uses against that declaration, then type erasure happens as the class file is written, and it becomes a plain List.

http://en.wikipedia.org/wiki/Generics_in_Java

I can go into more detail if you like.

Thanks,

Rob

On Aug 21, 2012, at 8:07 AM, "joseaio" <[hidden email]> wrote:

> I think that optional Type System (as Strongtalk) must be interesting for Redline (and easy to implement thank you to Java Generics)
>
>   What do yo think?

Reply | Threaded
Open this post in threaded view
|

Re: Smalltalk Type System

joseaio
Of course, I don't known that redline generate java byte code directly...

Thank you

On Tuesday, August 21, 2012 6:49:53 PM UTC+2, Rob Roland wrote:
Unfortunately, Java Generics are a compile-time function, handled by javac. We bypass javac by generating the byte code directly.

When javac sees List<String>, it checks all the uses against that declaration, then type erasure happens as the class file is written, and it becomes a plain List.

http://en.wikipedia.org/wiki/Generics_in_Java

I can go into more detail if you like.

Thanks,

Rob

On Aug 21, 2012, at 8:07 AM, "joseaio" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="E4VIbPibZ2cJ">jose.i...@...> wrote:

> I think that optional Type System (as Strongtalk) must be interesting for Redline (and easy to implement thank you to Java Generics)
>
>   What do yo think?