genetictype

0.0.3 • Public • Published

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();
 

/genetictype/

    Package Sidebar

    Install

    npm i genetictype

    Weekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • toddpi314