Board index » delphi » Ups and Downs of OOP

Ups and Downs of OOP

I'm wondering... What are the positive and negative aspects of using OOP
over regular Pascal programming methods?

Is there normally an increase or decrease in speed at all?

Is there normally higher memory requirements?

Are the end programs faster or slower, and do they normally compile to
bigger EXE's?

        -- Kim Forwood --

  /-=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=-\
  $           Kim Forwood  <kim.forw...@access.cn.camriv.bc.ca>          %
  %         For what purpose is life, if one cannot live freely?         $
  \-=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=--=oOo=-/

 

Re:Ups and Downs of OOP


On 16 Apr 1996 13:08:12 PST, Kim.Forw...@access.cn.camriv.bc.ca (Kim

Quote
Forwood) wrote:

>I'm wondering... What are the positive and negative aspects of using OOP
>over regular Pascal programming methods?

>Is there normally an increase or decrease in speed at all?

no real difference..

Quote
>Is there normally higher memory requirements?

pretty much..

Quote
>Are the end programs faster or slower, and do they normally compile to
>bigger EXE's?

the programs are about the same speed, maybe even faster because the
variables are always local.. but they do compile to bigger .EXE's.

insanic kwikmaster [ik^tms]: insanic terror: 916.427.8827
  tms!phear

Re:Ups and Downs of OOP


Quote
Kim Forwood wrote:

> I'm wondering... What are the positive and negative aspects of using OOP
> over regular Pascal programming methods?

> [snip]

IMHO, the real advantage is that programs can become arbitrarily
complicated at run time, without incurring excessive programming loads to
maintain all of the bits and pieces.  I mostly code data acquisition
stuff, and it is nice to be able to be able to launch another type of
experiment from within the main program just by opening an
OOWindow/Experiment beastie.  I've coded experiemnts using the non-OOP,
and it often degenerates into messy code (especially when you decide to
add functions 12 months after the original program was 'complete').
Now I am working on STM software and image analysis, where the OO-MDI
interface makes image comparisons a breeze.

The real down side that I see to BP7's version of objects is that there
is no obvious way to package up objects into DLLs, to make the program
truly run-time adaptable.
--
p. rowntree
Departement de chimie, Universite de Sherbrooke, Sherbrooke, Quebec,
Canada

Re:Ups and Downs of OOP


                                                 17 Apr 96

 Hi folks,

 Kim.Forw...@access.cn.camriv.bc.ca (Kim Forwood)  wrote on 16.04.96 at
 /COMP/LANG/PASCAL/BORLAND under the topic of "Ups and Downs of OOP"
 (MsgID: 8296744935...@access.cn.camriv.bc.ca)

 KF> What are the positive and negative aspects of using OOP?
 KF> Is there normally an increase or decrease in speed at all?
 KF> Is there normally higher memory requirements?
 KF> Are programs faster or slower, do they compile to bigger EXE's?

 If you have understand OOP, your sources are smaller, easier to read
 and maintain and in somve cases things can be realised easier.

 Try to create a library like TurboVision without OOP.

 cu

 Hendrik
--
"I am still confused, but on a higher level"
(Prof. Dr. Patzelt zu Ulli, nachdem dieser sein Programm erklaert hatte)

Re:Ups and Downs of OOP


In article: <8296744935...@access.cn.camriv.bc.ca>  

Quote
Kim.Forw...@access.cn.camriv.bc.ca (Kim Forwood) writes:

>I'm wondering... What are the positive and negative aspects of using OOP
>over regular Pascal programming methods?

>Is there normally an increase or decrease in speed at all?

There is very little difference normally. Event driven programs (they normally
use OOP) can be slower if not designed properly.

Quote
>Is there normally higher memory requirements?

It just depends. Sometimes the code can be considerably smaller because
"inheritance" often allows OOP programs re-use code more than a procedural
program.

-- Jay

 ---------------------------------------------------------------------------
| Jason Burgon - author of Graphic Vision, TV-Like GUI for 256 Colour SVGA  |
| g...@jayman.demon.co.uk   ftp://SimTel/msdos/turbopas/gv4svga1.zip          |
|                         http://www.en.com/users/grendel/prog/tv_prog.html |
 ---------------------------------------------------------------------------

Re:Ups and Downs of OOP


In article <671-LjTe...@emcom.doo.donut.de> BASICB...@emcom.doo.donut.de (Hendrik T. Voelker) writes:

Quote
> KF> What are the positive and negative aspects of using OOP?
> KF> Is there normally an increase or decrease in speed at all?
> KF> Is there normally higher memory requirements?
> KF> Are programs faster or slower, do they compile to bigger EXE's?
> If you have understand OOP, your sources are smaller, easier to read
> and maintain and in somve cases things can be realised easier.
> Try to create a library like TurboVision without OOP.

One of my favorite examples is good ol' "Destroy."  In Delphi you can say:

        for i := 1 to numObjects do objectArray[i].Destroy;

And you have utterly no idea -- nor do you care -- exactly what the computer
had to do to destroy those objects.  With five different kinds of objects in
the array it might have done five different things!  But the computer figured
it out; it did so at runtime, and your short piece of code works just fine.

The program might be larger, or slower, than it theoretically could have been,
but computer-time on my fully-depreciated 486 costs $0.00 per minute while my
time spent writing and debugging the code and cleaning up after the mess can
be several dollars a minute.

/mr/

Other Threads