Brendan Eich wrote:
Herby Vojčík wrote:
That is, these are identical, except the syntax:

r = o.p.q {p: {q: r}} = o
r = o.?p.q {?p: {q: r}} = o
P=o.p; Q=o.?q {p: P, ?q: Q} = o

Here I part company only on syntax:

r = o?.p.q {p?: {q: r}} = o
P=o.p; Q=o?.q {p: P, q?: Q} = o

And of course, the short-hand works:

p=o.p; q=o?.q {p, q?} = o

Oh, now that I see details, I do not like the syntax, because the symmetry of use of ? vanished.

Compare:
        r = o.?p.q      {?p: {q: r}} = o        // in both forms, "?p"
vs,
        r = o?.p.q      {p?: {q: r}} = o        // 1st: "o?"; 2nd: "p?"

And:
        p=o.p; q=o.?q   {p, ?q} = o     // I can say informally
                                        // o.{p, ?q} meaning
                                        // {o.p, o.?q}
vs.
        p=o.p; q=o?.q   {p, q?} = o     // 1st: "o?(.q)", 2nd: "(o.)q?"

But of coures, if it has some serious problems / is unacceptable from other reasons, then different syntax must be used.

/be

Herby
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to