On Sun, Jan 4, 2015 at 1:07 AM, Matt Oliveri <[email protected]> wrote:
> > I think that part of the complication in trying to sort through all of > this > > has been that we have too many things going on in the type system at > once. > > Let's imagine, without loss of generality, a language in which all types > > (even primitive types) are boxed, and in which call-by-value is > implemented > > by introducing explicit invocations of ShallowCopy() in the receiver. > > I sort of like this way of elaborating the code. I like it because > what I think it's essentially trying to do is make the use of l-values > explicit. But I don't like it because l-values are not ref's; they are > not first class. (They can be made first class with pointers, of > course, but we don't want to put in extra pointers just to optimize > them out, do we?) > That's one way to view things. Another way is to note that the l-value/r-value distinction only exists in the first place because of unboxing. In the scheme I proposed, ignoring obvious optimizations, all of the (initially) stack-allocated things are constant reference bindings. There's a huge loss of performance here if we implement this naively, but there is no inherent loss of abstract expressive power. shap
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
