Does OOP mean that the paradigm is around ADTs, since ADTs are the base of objects? If so, if ADTs are used procedurally, what does this make the procedural code?
Asked
Active
Viewed 99 times
0
-
1related: [What is the difference between object oriented programming and procedural programming?](https://stackoverflow.com/a/60118513/1371329) – jaco0646 Oct 03 '20 at 04:11
1 Answers
0
I am not sure I totally understand your question, but even so, ADTs predate OOP direct support in languages (or language compilers). This usually means that you can(could) emulate OOP support, when it does(did) not exist(ed), by manipulating ADTs and following certain conventions your respect (yourself, not forced by the compiler). If you do that, you are writing code in object-oriented style, although only using available procedural mechanisms.

progmatico
- 4,714
- 1
- 16
- 27
-
Interesting, thanks for your input. i've been reading around the subject,https://en.wikipedia.org/wiki/Object-Oriented_Software_Construction It goes through everything. One point brought up is that objects should be backed by ADTs and goes on to say classes are ADTs crossed with modules. It's a very confusing topic, OOP is definitely a style like you say but it is also called a paradigm, seems like we have been programming OOP for a lot longer than OOP languages have been around! I wonder why OOD came after structured design? – Richard Bamford Oct 02 '20 at 19:51
-
It probably means that by using classes for ADTs, you get encapsulation benefits similar to using ADTs wrapped in modules. – progmatico Oct 03 '20 at 18:50
-
1It was a question of evolution. OOP is an abstraction over other lower level concepts. These ones, present in procedural programming, closely reflected some of the constructions possible with CPU instruction sets. That is why the C language looks like how it looks. It was a natural mapping of available CPU instructions and features. – progmatico Oct 03 '20 at 19:05