On 8/11/2016 6:38 AM, Sönke Ludwig wrote:
What would be nice to add is a behavior specification for 'scope' member
variables (lifetime considered equal or slightly shorter than parent object
lifetime). For example the `RefCountedSlice.payload` and `count` fields could be
annotated with 'scope' to let the compiler actually guarantee that they won't be
accessible in a way that conflicts with their lifetime (i.e. the 'scope' return
of 'opIndex' would actually be enforced).
That adds a fair amount of complication I haven't worked through.