News for hackers. Stuff that matters.
Re:Glimmer.js: What’s the Deal with TypeScript? by Macha on Thursday April 20, 2017 @04:39PM (#14160627)
It's cheating a bit to indent the JS option only. I don't think:

myObject= a: b: c: d: 'some value'

Is really _that_ much of an improvement over:

myObject = {a: { b: { c: { d: 'some value' } } } }

especially combined with an editor that will match those closing brackets for you. And the reality is that if you have object literals that deep, chances are the inner values will also be large enough to justify expanding it anyway.

Also lodash plugs a large number of holes in the standard functionality. In most projects I work at, I'd write something like:

_.get(myObject, 'b.c.d')

for your second example.

There are no comments on this comment yet.