You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would allow you to distinguish zero from not-set, and possibly allow you do do better memory management for repeated fields (slice-of-pointer is a bit more granular than slice-of-struct). Since 'nil' is actually a first-class datastore type, I don't see why this wouldn't be plausible.
It would also have the benefit of reducing the number of 'gotcha!'s by one, for folks who design datastore models.
The text was updated successfully, but these errors were encountered:
This would be indistinguishable from having a Foo in the middle with zero-valued strings. We could make the zero-value strings nil instead, but the problem is essentially the same. We'd need to introduce a new property like Bar.Foos.$present which would be an array of bools... and then it starts getting complicated :)
This would allow you to distinguish zero from not-set, and possibly allow you do do better memory management for repeated fields (slice-of-pointer is a bit more granular than slice-of-struct). Since 'nil' is actually a first-class datastore type, I don't see why this wouldn't be plausible.
It would also have the benefit of reducing the number of 'gotcha!'s by one, for folks who design datastore models.
The text was updated successfully, but these errors were encountered: