Array.create and Function.create
ljharb at gmail.com
Thu Jan 10 21:19:28 UTC 2019
Sorry if I was unclear; it's *impossible* to have an array without a
`.length` own property, and there'd be no way to get the length or iterate
over it if you did. I'm also not clear on why you'd want to store named
properties on an array, especially if you can't iterate it because it
doesn't have a length?
On Thu, Jan 10, 2019 at 11:04 AM T.J. Crowder <
tj.crowder at farsightsoftware.com> wrote:
> On Thu, Jan 10, 2019 at 1:54 PM Augusto Moura
> <augusto.borgesm at gmail.com> wrote:
> > If you don't want the iterable features neither the own properties,
> > what're the benefits over a object indexed by numbers `const o =
> > Object.create(null); o = 12; ...`?
> And re functions, using them as state containers without their usual
> features seems like a bad idea^H^H^H^H^H^H^H^H edge case best handled
> by `setPrototypeOf` and `delete`. :-)
> -- T.J. Crowder
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss