Bob Myers (2019-05-30T23:42:38.000Z)
rtm at gol.com (2019-05-31T05:49:14.780Z)
> Another argument is that a `pick` helper function is really easy to be implemented and the problem that the syntax resolves is mostly aesthetic We've been over this ground before. Yes, there's a valid cost/benefit question for any syntactic sugar proposal, and no one would claim there is not one here as well. However, we write `o.p` and `{p: v}`, where `p` is not required to be quoted, so being forced to quote each and every property name as the argument to a pick API is not very attractive. In addition, pick APIs such as lodash do not provide any of the machinery already designed and introduced for destructuring to allow renaming and defaults, which the extended dot notation gives us "for free", since the thing in curly brackets on the right-hand side is precisely a deconstructing construct, as in ``` obj.{a = 2, b: c, d: {e}}} ``` which defaults `obj.a` to the value 2, renames `b` to `c` on the way out, and plucks `e` from inside `d`; this kind of thing is hardly feasible in an API. This is not new syntax. We already have the syntax. The single new thing is allowing it on the right side of dots. That's it. It does not increase messiness, it reduces it. Bob