3 ms·
Thankfully it is not "OOP all the way". You can write a lot of functional, or at least simply procedural (modular) without ever needing to define your own clas
by blunte 6y ago
Thankfully it is not "OOP all the way".
You can write a lot of functional, or at least simply procedural (modular) without ever needing to define your own class. Sure, you'll be instantiating some objects implicitly or explicitly at times, but you don't have to make your code be class-based.
You can write pure functions, although you do have to be aware of space/time concerns depending on the situation. Obviously you want to avoid copying huge data structures frequently. But in a lot of cases, the performance cost is low, so you can respect your inputs by not mutating them and just return some value/collection.