I like JS's flexibility too, but I have to point out that your object-oriented JS code is compiled into C++ classes by the v8 optimizer! (Unless you change their structure, in which case it gives up (deoptimization).)
makeThing(options, usethistoo) { let foo = options.foo; let thistoo = usethistoo;
return {
functions...
}
}You can use d8 to check what the class structure ends up looking like [2]
---