OOP vs procedural

For everything that's not in any way related to PureBasic. General chat etc...
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Re: OOP vs procedural

Post by thefool »

Let me quote some things from my professor in the object oriented programming course.
We make the following observations about structured programming:



- Structured programming is narrowly oriented towards solving one particular problem

--- It would be nice if our programming efforts could be oriented more broadly

- Structured programming is carried out by gradual decomposition of the functionality

--- The structures formed by functionality/actions/control are not the most stable parts of a program

- -- Focusing on data structures instead of control structure is an alternative approach

- Real systems have no single top - Real systems may have multiple tops [Bertrand Meyer]

- --- It may therefore be natural to consider alternatives to the top-down approach
We are now turning our interests towards 'the object-oriented way'. Below we list some of the most important ideas that we must care about when we make the transition from structured programming to object-oriented programming. This discussion is, in several ways, continued in Chapter 2.



- The gap between the problem and the level of the machine:

- --- Fill the gap bottom up

-Use the data as the basic building blocks

- --- Data, and relations between data, are more stable than the actions on data

- Bundle data with their natural operations

- --- Build on the ideas of abstract datatypes

- --- Consolidate the programming constructs that encapsulate data (structs/records)

- Concentrate on the concepts and phenomena which should be handled by the program

- --- Make use of existing theories of phenomena and concepts

- --- Form new concepts from existing concepts

- Make use of a programming style that allows us to collapse the programming of objects
I'm personally favoriting (and using) the object oriented style for many tasks both at the university and at work. I like the ideas of abstraction, specialization etc. Of course i could get much more in to the different points above (this is from our first lecture, which was several months ago), but its your report :D
But ask if you get stuck and need to get explained a specifc topic, though i might not be able to check here a lot tonight (got a deadline tomorrow on some parts of our report. Designing class diagrams, actually :))

We're using C#. I'm not that fond of java, the whole idea of making all functions virtual by nature is not something i favour. C# is IMHO one of the only really well-designed object oriented languages (of course, C++ and Java is important steps in the history of OOP. But no doubt C# is a fantastic language to work with). And the .net framework is great to have in the back.

This doesn't mean i'm against structured programming. It has its good sides, too. And purebasic is a good choice for that (sometimes structured programming is just what you need). Structured and object oriented programming languages aren't competitors, though people often seem to make them that.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: OOP vs procedural

Post by srod »

This doesn't mean i'm against structured programming. It has its good sides, too. And purebasic is a good choice for that (sometimes structured programming is just what you need). Structured and object oriented programming languages aren't competitors, though people often seem to make them that.
I agree; use whichever you are most comfortable with for the particular task in hand. These days I find myself switching between the two 'styles' and am very comfortable doing so.
I may look like a mule, but I'm not a complete ass.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Re: OOP vs procedural

Post by Kale »

thefool wrote:C# is IMHO one of the only really well-designed object oriented languages (of course, C++ and Java is important steps in the history of OOP. But no doubt C# is a fantastic language to work with
IMHO, C# is the only thing microsoft has ever got right. And yes, you're right, it really is one of the best OOP languages out there. Python is the other one! :P
--Kale

Image
User avatar
the.weavster
Addict
Addict
Posts: 1581
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: OOP vs procedural

Post by the.weavster »

Kale wrote:Python is the other one! :P
Agreed - and if you really don't like objects Python can do that too.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: OOP vs procedural

Post by Psychophanta »

Ehhh! [nested offtopic]:
Taking advantage we are in offtopic terrain, ¿why talisman has so similar avatar than thefool? brothers or someting?
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
the.weavster
Addict
Addict
Posts: 1581
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: OOP vs procedural

Post by the.weavster »

Psychophanta wrote:¿why talisman has so similar avatar than thefool? brothers or someting?
They were fawning over each other in the iPhone thread :wink:
Could be the start of something beautiful :D
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Re: OOP vs procedural

Post by thefool »

haha :lol:
No, not brothers. He just liked my avatar :D
Kale wrote:Python is the other one! :P
Yeah i know a lot of people saying that. Never really learned python, but plan to read up on it in my christmas holiday :)
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: OOP vs procedural

Post by Fluid Byte »

What's all that fuss about the avatar? It sux ....
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Re: OOP vs procedural

Post by thefool »

f*** off :lol:

Copycats
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Re: OOP vs procedural

Post by Fluid Byte »

har har :P
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: OOP vs procedural

Post by nco2k »

now only thing left, is an avatar for fred. :)

Image

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
Demivec
Addict
Addict
Posts: 4282
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: OOP vs procedural

Post by Demivec »

Things seem to have gotten a little out-of-hand. Will the real thefool raise your hand. :D
User avatar
talisman
Enthusiast
Enthusiast
Posts: 231
Joined: Sat May 23, 2009 9:33 am

Re: OOP vs procedural

Post by talisman »

Aahhhaahahahahahhahahahahh :lol:
Damn you made me spill my coffee :mrgreen:
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Re: OOP vs procedural

Post by thefool »

haha :lol:
Seriously :P
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: OOP vs procedural

Post by Mistrel »

What a bunch of fools. :wink:
Post Reply