3 ms·
Because the ADT mostly just describe the shape of data moving through the system. Less control flow and logic is tied up in abstraction. Functions are typical
by cjonas 4y ago
Because the ADT mostly just describe the shape of data moving through the system. Less control flow and logic is tied up in abstraction. Functions are typically small, pure and either "composable" or "disposable"
- BerislavLopac 4y agoLike 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.