Object Oriented Programming
Procedural
Spaghetti Code!
I do procedreal and than use includes so that I can reuse the procedral code. I never took the time to learn OOP and procedral works just fine for me so I will stick with that until i get a job and they fource me into OOP
Why is it that people assume OOP = reusable, but procedural = forced recode?
I dunno. C libraries worked fine for years.
OOP is imperative programming with tools for extension. Inheritance let's one define new classes that have all the old properties and methods, with new ones. Polymorphism lets one act on objects without knowledge of their type. Et cetera...
Procedural programming can do all of the above without much effort but often things are coded in a way that they can't be used trivially again, in another program.
If anything, OOP is more a way of thinking about things.
Hey,
to be very honest, i prefer Oop.
OOP. Procedural code leads to spaghetti code no matter how you slice it.
Code:for (int i;;) { cout << "Smith"; }
Can you expand on that assertion, please?
In fact, you can't. Since many purely procedural languages have only structured constructs (no gotos, jumps, exceptions, threads, etc...) and they are Turing-complete. Being Turing-complete guarantees that they can construct an interpreter for any other Turing-complete language - even OOP languages.
OOP is all about reuse - it doesn't change structure much.
I should probably reword my statement: "When I write in procedural code it turns into spaghetti code, no matter how I slice it".
Code:for (int i;;) { cout << "Smith"; }
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks