2 ms·
Like everything else in software development, there are different valid approaches, and it's up to us (the developers) to use them in ways that suit us the most
by BerislavLopac 4y ago
Like everything else in software development, there are different valid approaches, and it's up to us (the developers) to use them in ways that suit us the most.
I've come to realise that all coding, regardless of the language, comes down to two things:
1. defining what the data we're working on looks like
2. defining what do we want to do with that data
Different languages and "paradigms" approach these "things" in different ways: OOP revolves around the idea of the operations and the data being hauled around together, in a single "object"; functional programming strictly separates the two into functions and data types; and so on.
In your case, the approach you're describing works great, and fits your use case perfectly; in some other cases, a more object-oriented approach is a better fit. There is no silver bullet.