Re: Self type

2007-08-14 Thread Brendan Eich
On Aug 14, 2007, at 12:46 PM, Nicolas Cannasse wrote: > Have you not considered having a two-level type spec ? One for > compile-time and one for runtime ? If I'm not wrong, Java did that > with > generics. We do not want a profiled or segmented specification, apart from the optional strict m

Re: Self type

2007-08-14 Thread Jeff Dyer
On 8/14/07 12:46 PM, Nicolas Cannasse wrote: > The only problem so far is that it seems there is no structural types > support in AVM2/Tamarin yet, or did I miss it ? Nope, no support for structural types in AVM2. ___ Es4-discuss mailing list Es4-di

Re: Self type

2007-08-14 Thread Nicolas Cannasse
Brendan Eich a écrit : > On Aug 14, 2007, at 10:10 AM, liorean wrote: > >>> Peter Hall wrote: type B = {b:Self}; >> On 14/08/07, Cormac Flanagan <[EMAIL PROTECTED]> wrote: >>> Yes, I think this should be fine. >> I'm all for allowing recursive structural types e.g. for use as binary >> trees

Re: Self type

2007-08-14 Thread Brendan Eich
On Aug 14, 2007, at 10:10 AM, liorean wrote: >> Peter Hall wrote: >>> type B = {b:Self}; > > On 14/08/07, Cormac Flanagan <[EMAIL PROTECTED]> wrote: >> Yes, I think this should be fine. > > I'm all for allowing recursive structural types e.g. for use as binary > trees or linked lists. > > type

Re: Self type

2007-08-14 Thread liorean
> Peter Hall wrote: > > type B = {b:Self}; On 14/08/07, Cormac Flanagan <[EMAIL PROTECTED]> wrote: > Yes, I think this should be fine. I'm all for allowing recursive structural types e.g. for use as binary trees or linked lists. type BinTree = {sin:Self, dx:Self, value:*}; -- David "liorean

Re: Self type

2007-08-14 Thread Cormac Flanagan
Peter Hall wrote: > On 8/14/07, Eylon Stroh <[EMAIL PROTECTED]> wrote: >> From the proposal: >> "The return type T2 is ok, even if the function returns a T1 instead... >> covariant occurrences of Self (eg in the result type) are replaced by >> T2" >> > > I was also wondering about this. > To me,

Re: Self type

2007-08-14 Thread Cormac Flanagan
Eylon Stroh wrote: >>From the proposal: > "The return type T2 is ok, even if the function returns a T1 instead... > covariant occurrences of Self (eg in the result type) are replaced by > T2" > > Please correct me if I'm wrong, but it seems to me that return types can > also be placed in context

Re: Self type

2007-08-14 Thread Cormac Flanagan
Peter Hall wrote: >>> Or can't Self be used outside of the sorts of usage found in the >>> proposal examples? >> That's it. > In that case, I think it needs to be clearer about how the syntax can > be used. Is it only for use as the "this" parameter for function > types? Seems to me like it shoul