What Are Exotic Objects?

Viewed 1725

I just found out about Exotic Objects in ES6. I struggled a lot trying to understand them and couldn't find much simple information, so I have plenty questions:

  1. Can I create new exotic objects types or only the ones defined by the standard can exist?
  2. Which are the kinds of exotic objects defined by the standard?
  3. Do we really need all the kinds of exotic objects, or are they there for compatibility with older standards? For instance, couldn't Arguments exotic objects be implemented with a normal array prefilled with the default arguments?
  4. Initially, I imagined that Object.create(proto) didn't work as expected only on prototypes of exotic objects (e.g. Object.create(Array.prototype) doesn't quite work), but then I realized that it also doesn't work as expected with the prototype of Set and Map, which don't seem to be exotic objects... are these some other kind of special objects different from exotic ones?
  5. Is there any way to identify whether an object is an exotic one?

I'm quite confused about exotic objects; a generic overview on them would be much appreciated.

0 Answers
Related