Maker

From Erights

Jump to: navigation, search

Maker: In E idiom, an object which returns new objects. Roughly corresponds to a class object in traditional OO with reified classes.

def makePair(x, y) {
    def pair {
        to x() { return x }
        to y() { return y }
    }
    return pair
}

makePair is a maker.

In E-on-Java, each Java class has a maker object which has the constructors and static methods of that class.

This page is a stub; it should be expanded with more information. If doing so, check the original E web site and the mailing list archives for content which could be moved into this page.
Personal tools
more tools