On 24 August 2013 06:01, Jonathan S. Shapiro <[email protected]> wrote: > While linear types enforce the desired properties, the fact that they can't > handle fork/join behavior turns out to be a pretty significant impediment.
I take you really out of context here, since you're talking about ownership of object graphs and not linear types as a general mechanism; but of course linear types can handle fork/join. A linear type is a type constraint that can be invalidated - such a thing is required to be able to distinguish "this view on the data is known to be valid here" from "this view of data was known to be valid at some point". Linear types are a means for introducing mutability into the type system; you can use them to implement things like owned pointers and borrowed references, but lifetime analysis of values is not the full effect of linear types - because lifetime analysis of /types/ can describe properties preserved by fork/join, and probably all manner of concurrent conditions. Anyway, sorry I'm not adding much, just didn't want that to become a soundbite! > Perhaps ARC would have worked, but ARC would mean giving up one of the > motivations for linear types: isolation. If exactly one process can hold a > reference to something in the shared heap, then we know that no action by > any other process can alter the data in that object. That's a surprisingly > important guarantee in some cases. Immutability of shared data could also be an option. -- William Leslie Notice: Likely much of this email is, by the nature of copyright, covered under copyright law. You absolutely may reproduce any part of it in accordance with the copyright law of the nation you are reading this in. Any attempt to deny you those rights would be illegal without prior contractual agreement. _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
