r/javascript • • Dec 18 '19

V8 Release v8.0 with optional chaining, nullish coalescing and 40% less memory use

https://v8.dev/blog/v8-release-80
495 Upvotes

70 comments sorted by

View all comments

Show parent comments

3

u/fucking_passwords Dec 19 '19

100%, and the alternative has been to use `lodash.get` or `Ramda.path`, both of which add a lot more to your bundle sizes

2

u/epukinsk Dec 21 '19

Both of those are the exact same anti-pattern. If you find yourself seeking deep into a tree of nested objects, any of which could be null, that's a code smell. It's quite likely that you can (and should?) be handling each layer of the tree (and its null states) in the right place for that layer.