Existential Operator / Null Propagation Operator

Ron Waldon jokeyrhyme at gmail.com
Fri Oct 30 01:58:09 UTC 2015


Yep. I agree now. I see that this would break loads of existing code.
Thanks.

On Fri, 30 Oct 2015, 12:23  <es-discuss-request at mozilla.org> wrote:

Send es-discuss mailing list submissions to
        es-discuss at mozilla.org

To subscribe or unsubscribe via the World Wide Web, visit
        https <https://mail.mozilla.org/listinfo/es-discuss>://
<https://mail.mozilla.org/listinfo/es-discuss>mail.mozilla.org
<https://mail.mozilla.org/listinfo/es-discuss>/
<https://mail.mozilla.org/listinfo/es-discuss>listinfo
<https://mail.mozilla.org/listinfo/es-discuss>/
<https://mail.mozilla.org/listinfo/es-discuss>es-discuss
<https://mail.mozilla.org/listinfo/es-discuss>
or, via email, send a message with subject or body 'help' to
        es-discuss-request at mozilla.org

You can reach the person managing the list at
        es-discuss-owner at mozilla.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of es-discuss digest..."
Today's Topics:

   1. Re: Re: Existential Operator / Null Propagation Operator
      (Laurentiu        Macovei) (Isiah Meadows)
   2. Re: Existential Operator / Null Propagation Operator
      (Waldemar Horwat)
   3. Re: Existential Operator / Null Propagation Operator
      (Claude Pache)
   4. Re: Map literal (Alexander Jones)

---------- Forwarded message ----------
From: Isiah Meadows <isiahmeadows at gmail.com>
To: Ron Waldon <jokeyrhyme at gmail.com>, es-discuss at mozilla.org
Cc:
Date: Thu, 29 Oct 2015 23:03:28 +0000
Subject: Re: Re: Existential Operator / Null Propagation Operator
(Laurentiu Macovei)

I strongly oppose. I already write a ton of code that relies on that
throwing, using that for testing purposes. I'd rather something throw
violently than to silently fail in an unexpected, potentially seemingly
unrelated place. Not even pure functional programming can act as a safety
net for implicit undefined/null access.

On Thu, Oct 29, 2015, 15:30 Ron Waldon <jokeyrhyme at gmail.com> wrote:

Has anyone considering just making dot-property access return intermediate
undefined or null values by default?

Not having to introduce new syntax would be a bonus. I'm trying to think of
existing code that this would break and can't think of any good examples.

The only compatibility issue I have thought of so far is code that relies
on an Error being thrown but also does not check the value:

```js
let value;
try { value = deep.deep.deep.prop; } catch (err) { /* ... */ }
// use value without even a basic truthy test
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151030/f4031db0/attachment.html>


More information about the es-discuss mailing list