On Tue, Mar 11, 2008 at 2:32 PM, Peter Hall <[EMAIL PROTECTED]> wrote:
> Perhaps you can't achieve this without new syntax, but the declarative
> approach seems cleanest and not prone to this sort of anomaly. If new
> syntax could be considered, an |enumerable| attribute, complemented by
> a |!enumerable| attribute seems very clean.
>
> type T = {enumerable a:int, b:int};
> let t:T = {a:1, b:2}:T; // a is enumerable, b is not
>
> let s = {a:1, !enumerable b:1}; // a is enumerable, b is not
>
> class C {
> enumerable var p;
> }
Hi Peter, I like the idea of a more declarative approach as well, if
one can be found. However, this proposal has two problems from our
perspective:
* It introduces new syntax, as you mention.
* It depends on the proposed ES4 type system which is unacceptable to
the ES3.1 effort. ES3.1 needs a way to express these integrity
constraints in the absence of ES4 types.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss