3 ms·
Except that classes are more memory efficient and better optimized in the VM. This will package a copy of the functions with every instance you make, the class
by pleoxy 3y ago
Except that classes are more memory efficient and better optimized in the VM.
This will package a copy of the functions with every instance you make, the class variant will only create member variables for each instance.
Maybe save a few bytes down the wire with a different developer experience for fundamentally more bloated code.