Skip to main content

Blog Archive for forax during November 2006

The closure proposal specifies a new type java.lang.Undeclarable that can be used as a return type of a method to indicates that this method never returns. All instructions after a call to a method that returns Undeclarable is unreachable, by example :   Undeclarable throwAnIOException(String message) throws Exception {    throw new IOException(message);  }...
This blog is an infrared echo to Matthias Ernst's last post titled "How far is fidji". get rid of checked exceptions : For me the problem is not checked/unchecked exception but the fact that in the JDK, some places abuse of checked exceptions like reflection, rmi etc. I agree with matthias that it could be easy to add a keyword to transform or not xhecked exception to runtime...
I don't understand why array creation of array of parametrized type is forbidden by the JLS. Let me take an example :   public class Holder<E> {    public void set(E element) {      this.element=element;    }    public E get() {      return element;    } ...
Neal Gafter post a blog entry about adding reified generics to Java. I likethat proposal mostly because developpers will have the choice betweeen reified or not reified generics. About the syntax, i think it's better to use an anotation than to re-use the keyword class. Annotating a type variable is not currently allowed but it seems that the upcoming JSR 308 will allow that. class...