Maker

From Erights

Revision as of 23:10, 19 May 2009 by Kevin Reid (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
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