Closed mlhaufe closed 1 year ago
Current state:
traits are PascalCase:
const EvalTrait = trait('evaluate', { Lit({ value }) { return value }, Add({ left, right }) { return left.evaluate() + right.evaluate() } })
Data declarations are inconsistent:
const expData = data({ Lit: { value: {} }, Add: { left: {}, right: {} } }) // camelCase or PascalCase? const peanoData = data((Peano) => ({ Zero: {}, Succ: { pred: Peano } })); const ListData = data((List, T) => ({ Nil: {}, Cons: { head: T, tail: List(T) } }));
When complected the casing can match:
const List = complect(ListData, [...]) const exp = complect(expData, [...]) // PascalCase? const peano = complect(peanoData, [...])
data and trait should be consistent as PascalCase, which means data should be a constructor
This implies complect should also produce a constructor and not an instance.
Current state:
traits are PascalCase:
Data declarations are inconsistent:
When complected the casing can match:
data and trait should be consistent as PascalCase, which means data should be a constructor
This implies complect should also produce a constructor and not an instance.