r/javascript • • Feb 20 '18

Optional Chaining may be coming to JavaScript

https://dev.to/sammyisa/optional-chaining-may-be-coming-to-javascript--4ff0
321 Upvotes

100 comments sorted by

View all comments

Show parent comments

11

u/vinnl Feb 20 '18

Plus we use Babel in our workflow where I work so I guess I can use this right now!

But if syntax changes or it even never makes it to the standard as well, you will have to update your codebase.

1

u/[deleted] Feb 20 '18

Pretty sure this one will stick:

  • solves a common pain point

  • makes sense in both OO and functional contexts

  • similar syntax is present in multiple languages

  • transpiration produces very little ES5, so it is likely that the engine makers won't have too hard a job to implement it.

2

u/vinnl Feb 21 '18

Those are all very good points in favour of adopting it now - very helpful for people wanting to weigh their options to see whether it's worth it to them.

(Apart from you probably meaning to refer to transpilation :P)

1

u/[deleted] Feb 21 '18

Autocorrect never fails to amuse :)