On 14.04.2011 18:32, Dmitry A. Soshnikov wrote:
On 14.04.2011 1:23, David Herman wrote:
I don't think this feature is worth all this discussion or time, which is why I haven't said very much. But I don't like the idea.


Are you talking about Kyles proposal or about my initial?

I remind, my initial proposal was exactly about "?." operator to avoid this noisy and completely useless:

 if (foo.bar) {
    if (foo.bar.baz) {
        if (typeof foo.bar.baz.quax == "function") {
            foo.bar.baz.quax("value")
        }
    }
}

and to replace it with:

foo.bar?.baz?.quax("value");


Sorry, with foo.bar?.baz?.quax?("value")

which requires to parse not only "?." for functions as you see. Though, if it won't go for all convenient cases such as simple foo? then probably it's not so important.

foo? ? bar : baz // looks odd, but acceptable though

Dmitry.


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

Reply via email to