|
|
|
|
|
by breatheoften
1608 days ago
|
|
Is anyone still using the class keyword in javascript or typescript? private field syntax doesn't matter in the first place if you don't use class {} anywhere ... I feel like most of the typescript code i've been in recently looked like it needed 0 more class declarations. |
|
- Abstract classes are useful for defining nominal interface types
- Classes are a clear signal that a set of methods are designed to interact with related data types
- The prototype chain can be helpful for debugging where POJOs may lose information in the call stack
- JS runtimes can sometimes optimize classes in ways they can’t with POJOs