Closed
Description
Motivation
Boxed primitives are extremely rare and unidiomatic in real-world JavaScript, and cause more problems to support than worth it.
Proposed Solution
As discussed in #1405, we would want to deprecate fn new
on Number
and Boolean
to discourage use of boxed primitives, probably in favour of adding From<f64>
and From<bool>
implementations correspondingly (which will create real primitives).
Alternatives
Keep the methods, but not support them actively in other parts of the stack. This might be confusing though.
Additional Context
For what it's worth, we don't provide fn new
on e.g. JsString
so this aligns primitives nicely to a common format.