Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Friday, August 06, 2004

Here's my version of closures for Java:

public abstract class Block {
public Object yield(Object arg1, Object arg2) {
throw new UnsupportedOperationException();
}
public Object yield(Object arg) {
throw new UnsupportedOperationException();
}
public Object yield() {
throw new UnsupportedOperationException();
}
}

1 Comments:

  • Thanks a lot for the comment.

    We can definitely do a lot of closurish stuff, and hopefully one day it will be a first class citizen in Java ;)

    By Anonymous Anonymous, at 8/06/2004 11:59 AM  

Post a Comment

<< Home