3 ms·
Who doesn't do "hidden classes" (or maps, or inferred-classes, or whatever else we're calling them today)? All major JS engines certainly do.
by gsnedders 12y ago
Who doesn't do "hidden classes" (or maps, or inferred-classes, or whatever else we're calling them today)? All major JS engines certainly do.
- Arnavion 12y agoMy point was that hidden classes is not a reason to keep nor break insertion-order enumeration. The example I gave was V8 breaking insertion-order enumeration, but for a reason entirely unrelated to its use of hidden classes - it implements Arrays as Objects with consecutive numeric keys, so Objects with consecutive numeric keys get enumerated like Arrays. So yes, while all major browsers use hidden classes today, that itself is not sufficient to explain why insertion-order enumeration is not maintained.