attic-labs / noms

The versioned, forkable, syncable database
Apache License 2.0
7.44k stars 266 forks source link

More internal vs external type problems: Mutative collection methods must be sure to "unwrap" return values #783

Closed ghost closed 8 years ago

ghost commented 8 years ago

e.g. (Compound)Set(Leaf).Insert().

What gets returned is a new Set, which is the result of re-chunking. The problem is that if there is a codegen typed registered for that type, then the result will be codegen type and thus fail the type assertion to .(Set).

Thus, all mutative APIs for collections, must ensure their return value is "unwrapped" (and in the case their is a wrapper, the typed wrapper will then "re-wrap" =-(

ghost commented 8 years ago

This is no longer a problem since we got ride of codegen