Object Propagation Operator (was Re: Existential Operator / Null Propagation Operator)
# Isiah Meadows (9 years ago)
Ignore that last email...misremembered the context.
Ignore that last email...misremembered the context. On Fri, Oct 30, 2015, 06:06 Isiah Meadows <isiahmeadows at gmail.com> wrote: > It's visually ambiguous, though. I really don't want to be reading > `foo..bar()` and `1..toString()` in the same file. They look the same, but > mean two completely different things. > > In a language that has this feature, I almost never use it, anyways, > unless I'm interacting with the DOM. And even then, I'm not saving that > much typing. Not with an editor with tab completion (most do). > > On Thu, Oct 29, 2015, 19:29 Claude Pache <claude.pache at gmail.com> wrote: > >> >> >> > Le 30 oct. 2015 à 00:07, Waldemar Horwat <waldemar at google.com> a écrit >> : >> > >> >> On 10/29/2015 14:20, Claude Pache wrote: >> > >> >> In some cases – as in `3..toStrign()` –, `undefined` will be produced >> where an error was thrown. >> > >> > >> > No, this would continue to throw an error. >> >> Oops, you're right. So, `..` is 100% backward-compatible. >> >> —Claude >> _______________________________________________ >> es-discuss mailing list >> es-discuss at mozilla.org >> https://mail.mozilla.org/listinfo/es-discuss >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151030/2d31781f/attachment.html>
It's visually ambiguous, though. I really don't want to be reading
foo..bar()
and1..toString()
in the same file. They look the same, but mean two completely different things.In a language that has this feature, I almost never use it, anyways, unless I'm interacting with the DOM. And even then, I'm not saving that much typing. Not with an editor with tab completion (most do).