4 ms·
Give developers an alternative to classes that favors a higher performance ceiling and statically analyzability over flexbility. Is an entirely reasonable goal
by aardvark179 2y ago
Give developers an alternative to classes that favors a higher performance ceiling and statically analyzability over flexbility.
Is an entirely reasonable goal. Object shape in JS tends to go through a fixed pattern of mutation immediately after construction and although that can sometimes be analysed away by the JIT there are a lot of edge cases that can make that tricky.
You may not care, but I bet almost everybody who has actually worked on a JS engine does, and has good reasons for doing so.