Update Item Specifications
parent
915572c971
commit
adacad134f
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ This page is devoted to concepts and designs for the structure of items in the T
|
|||
|
||||
## Map-like object indexed by identifier and types
|
||||
|
||||
In this concept, we think of the TypeDispatcher object `math` simply as a big map indexed by a string identifier and a list of types. Since those are complex non-string indices, which JavaScript doesn't really handle gracefully, we provide the basic indexing method `math.resolve('foo', [T1, T2, ..., Tn])`, with a handful of special properties:
|
||||
In this concept, we think of the TypeDispatcher object `math` simply as a big map indexed by a string identifier and a list of types. Since those are complicated non-string and non-number "indices", which JavaScript doesn't really handle gracefully, we provide the basic indexing method `math.resolve('foo', [T1, T2, ..., Tn])`, with a handful of special properties:
|
||||
|
||||
* The `math` object is set up so that you can write `math.foo(a, b, c)` rather than `math.resolve('foo', [math.typeOf(a), math.typeOf(b), math.typeOf(c)])(a, b, c)`. For values that are functions, we should also be able to write `math.foo.resolve(T1, T2, T3)`.
|
||||
* The stored entities are "dependent objects" -- they record at their creation time what other entries of the TypeDispatcher object they depend on, and if any of those change, they are regenerated as needed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue