Augusto Moura (2018-07-20T17:09:09.000Z)
augusto.borgesm at gmail.com (2018-07-20T20:30:25.742Z)
The only use that came to mind was detecting a property descriptor in a prototype chain. Sure is not a day to day use case, but it's useful when writing libraries that involve descriptor modifications (decorators, for example, will largely involve it). Recently I had to get the descriptor of properties in a potencial deep inheritance (current Object helpers only return own descriptors), and used the `in` operator to guard the prototype recursive search. ``` js const searchRecursivelyPropDescriptor = (obj, prop) => !obj ? undefined : Object.getOwnPropertyDescriptor(obj, prop) || searchRecursivelyPropDescriptor(Object.getPrototypeOf(obj), prop); const getPropertyDescriptor = (obj, prop) => prop in obj ? searchRecursivelyPropDescriptor(obj, prop) : undefined; ``` Anyways, we can't simply ignore the operator, if we are getting a `!instance` and opening precedence to future operators (`!on` or `!hasOwn`) I don't see any problems with a `!in`. Legacy bad design should not affect language consistency of new features.