37 ms·
I used to change an objects class itself in runtime in JS by changing its __proto__ property. I don’t think that works anymore, but at the time I could create
by sroussey 3y ago
I used to change an objects class itself in runtime in JS by changing its __proto__ property.
I don’t think that works anymore, but at the time I could create plain value objects and later make them class instantiations (on a small system way back when, this was a nice speed up due to a now uncommon pattern of having data first and waiting for the classes to load).