On 4/13/11, Kyle Simpson <[email protected]> wrote: >> See http://wiki.ecmascript.org/doku.php?id=strawman:default_operator -- >> the proposal there is ?? and ??= since single ? is ambiguous after an >> expression due to conditional expressions (?:). > > The "default operator" doesn't address a significant part of what Dmitry is > asking for -- the . in the ?. usage -- which allows the property access to > be expressed only once and used for both the test and assignment. > I have sometimes wanted something like that to avoid temporary variables.
> > The other (more awkward/obscure looking) way to do this is: > > var a; > b && a = c; > a = b && c; Your suggestion to change the ternary operator is interesting but creates incompatibility. It is not feasible. -- Garrett _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

