Conversation
|
One thing that might be problematic with this approach. Assume we allow I think the new types in the left and right signatures will always receive different stamps, and thus be considered different, even when you want them to be the same. I don't think there will be any easy way to determine which ones should be regarded the same and which one should be regarded as distinct. I think this problem would not arise if we just added a new structural type constructor, pairing a name (not a stamp) with a type and requiring equality of names and related content when relating two types. @christoph-dfinity agree? |
|
|
||
| ##### Stable Storage and Migrations | ||
|
|
||
| For `.most` files (stable type signatures), newtypes are treated like type aliases. This allows users to freely add, rename, or remove newtypes across upgrades without breaking migration compatibility. |
There was a problem hiding this comment.
Hmm, I guess that might fix the problem I noticed with signatures. Feels a bit odd though.
There was a problem hiding this comment.
At least it would mean moving from unbranded map to branded map would not be a breaking change, but I'm not sure that's a good enough motivation.
|
A similar question would be if we want newtypes to appear in the Candid encoding. You could feasibly represent them as single element records/variants. But I don't know if that's desirable? |
No description provided.