genetictype
v0.0.3
Published
The GeneticType paradigm is a Type Pattern designed to allow evolutionary mutation of objects.
Downloads
2
Readme
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();