The problem is that Boolean is (afaik) the only type where Type(new Type(x)) !== Type(x).
For example String(new String(10)) === '10' but Boolean(new Boolean(false)) === true.
It's absurd to have to access the value of the object in its own "type cast" or in an if statement for example.
I understand the reason this happens is that evaluating the "truthiness" of an object will yield true but this should be a special case, how come document.all gets to be a falsy "object" but a Boolean doesn't?
Also, there is no need for a Boolean object wrapper at all,
document.all was required because too many websites were using a bad pattern and they couldn't all be updated. For non-web hosts like Node, Deno, Bun, XS, they don't have document.all so they have the untainted model where "every object is truthy, no exceptions".
I agree, Boolean objects should be avoided. It is unlikely that new Boolean can be removed from the language now as that would be a breaking change. Linting rules and teaching materials should discourage its use in new code.
@donno2048 MDN is not "official" as in, it's not "blessed by TC39". Our (MDN's) deprecation status faithfully reflects the spec and we don't make normative statements like deprecation ourselves. It would be TC39's job to mark Boolean objects as "deprecated", which I don't think they would do (the spec doesn't deprecate things just because it's hard to use or contains footguns; only dangerous or things never intended to exist can be). OTOH, the constructor page: Boolean() constructor - JavaScript | MDN already has a mention that " You should rarely find yourself using Boolean as a constructor." which to me is a sufficient callout to developers. I do have plans, though, to update all primitive wrapper objects' landing pages so they start with a note like "you should almost never work with the wrapper objects".