04:11 | <ljharb> | i think the Array.of behavior is ideal - it’s always Array unless you’re subclassing or doing something unreasonable, including when destructured. Sticking to purity is how you get the Promise statics, which break when you do the idiomatic thing and destructure them. |
05:34 | <bakkot> | the Array behavior seems kind of odd because it's not actually helpful for a subclass - if the subclass is relying on Subclass.of(x) working, then it probably also expects [x].map(Subclass.of) to work, not to make a base Array |
05:34 | <bakkot> | so if you're subclassing you're gonna have to override anyway |
05:34 | <bakkot> | at which point, why bother having of look at the receiver at all? |
05:35 | <bakkot> | (specifically, the Array behavior seems kind of odd relative to the simpler option of just always making a base Array) |