0.0.3 • Published 8 years ago

genetictype v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

GeneticType

The GeneticType paradigm is a Type Pattern designed to allow evolutionary mutation of objects.

Each interaction with an object further refines mutation history, which guides further behavior without having to manually link implementations across your a code architecture.

See the GeneticType Specification (V1)

Short Example

var pool = new GeneticType.GenePool();

var DogDefinition = class extends GeneticType.Abstract {
    constructor(genePool) {
      super(genePool);
    }

    run() {
      ...
    }
};

var CatDefinition = class extends GeneticType.Abstract {
    constructor(genePool) {
      super(genePool);
    }

    sleepLikeACat() {
      ...
    }
};

// register our definitions in the Gene Pool
pool.define(DogDefinition);
pool.define(CatDefinition);


// create our form
var dog = pool.create(DogDefinition);

// interact with form, allowing mutation
dog.run();
dog.sleepLikeACat();
0.0.3

8 years ago

0.0.2

8 years ago

0.0.0

9 years ago