Biju wrote:
> [behaviour of wrappers] is weird...
>
> Why cant we make objects for Number, String, Boolean, Date acts like
> their native counter part?
> That will be what an average web developer expecting.
> And I dont think it will make existing web break.
No, this brokenness is heavily relied on. It's not an obscure corner case.
Just don't use wrapper objects [*]. They are totally unnecessary and
useless. If a fix is needed, it is to have the spec say that explicitly.
[*] except where they are generated implicitly as temporaries when a
property of a primitive value is accessed -- although I bet most
JS programmers don't even know that is happening.
--
David-Sarah Hopwood ⚥
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss