3 ms·
I don't think it's bad enough to warrant introduction of new syntax sugar to make it shorter. The problem might be that we have most likely not yet handled the
by z3t4 7y ago
I don't think it's bad enough to warrant introduction of new syntax sugar to make it shorter.
The problem might be that we have most likely not yet handled the edge case situation where a.b and a.b.c doesn't exist. And just want to log out the value, and print undefined if it doesn't exist.
- gridlockd 7y agoI disagree. This is just an extreme example, but take it down one or two levels and it's extremely common. Ruby has had this kind of syntax since forever and it's one of the things that people love about it. > The problem might be that we have most likely not yet handled the edge case situation where a.b and a.b.c doesn't exist That's not an edge case, that's an expected case. If it doesn't exist, nothing is supposed to happen.