3 ms·
data structures and functions are very much related and connected. In fact, all data structures are invented to perform certain specific functions. OO is not
by vph 14y ago
data structures and functions are very much related and connected. In fact, all data structures are invented to perform certain specific functions. OO is not the answer to all things, but it provides a natural way to fuse data structures and its associated functions together.
- tikhonj 14y agoIn this case, "function" means mathematical function rather than purpose. Of course, if you want to take a somewhat reductionist approach, you could argue that data structures are functions. After all, in the lambda calculus, all you have are functions and you can use them represent numbers, pairs, lists, booleans, conditionals--basically whatever you want.