proposal-optional-chaining

By tc39

Proposal-optional-chaining Alternatives

Similar projects and alternatives to proposal-optional-chaining

tc39
proposal-optional-chaining
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better proposal-optional-chaining alternative or higher similarity.

proposal-optional-chaining discussion

Log in or Post with

proposal-optional-chaining reviews and mentions

Posts with mentions or reviews of proposal-optional-chaining. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-21.
  • What Operators Do You WISH Programming Languages Had? [Discussion]
    4 projects | /r/ProgrammingLanguages | 21 Oct 2022
    Nullable property access can be useful sometimes
  • PEP 505 – None-aware operators (2015)
    2 projects | news.ycombinator.com | 2 Aug 2022
    For comparison, here are the Javascript RFCs for the equivalent operators:

    https://github.com/TC39/proposal-optional-chaining

    https://github.com/tc39/proposal-nullish-coalescing

    IMO optional chaining is a lifesaver when dealing with deeply nested JSON, and it's become indispensable in our Typescript code. But we also deal with JSON from various third-party endpoints in Python, and far too often we resort to an inefficient deep_get utility to make our code sensical.

    > if json?.get("foo")?.get("bar")?[0]?.get("baz")

    may seem messy but would be infinitely better than the fragile (note the nested list-of-a-single-dict, and how bugs can appear if it's not there):

    > if json.get("foo", {}).get("bar", [{}])[0].get("baz")

    or the inefficient

    > if deep_get(json, "foo.bar.0.baz")

    It's not nearly as good as the Typescript json.foo?.bar?.[0]?.baz - but it's good enough!

  • Optional Chaining `?.` do multiple null checks
    1 project | dev.to | 28 Feb 2021
    Current Status: ECMAScript proposal at stage 4 of the process.
  • PHP 8 features I wish also existed in JavaScript
    1 project | dev.to | 8 Feb 2021
    In JavaScript you still have to check step by step, if the corresponding property exists. There is a corresponding TC39 proposal which is in stage 4 by now and I'm really looking forward to this being part of the ECMAScript Specs.
  • [AskJS] Over-using optional chaining. Is this pattern common?
    1 project | /r/javascript | 20 Jan 2021
    https://github.com/tc39/proposal-optional-chaining#is-this-error-suppression
  • A note from our sponsor - SaaSHub
    www.saashub.com | 16 Jun 2024
    SaaSHub helps you find the best software and product alternatives Learn more →

Stats

Basic proposal-optional-chaining repo stats
5
4,985
1.1
over 2 years ago

Sponsored
Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com