[comp.lang.pascal] Borland's Object-Oriented Pascal--is it worth it?

rmorey@orion.cf.uci.edu (Robert Morey) (06/10/89)

     Howdy,

     I just received an announcement from Borland saying how wonderful their
   Object-Oriented Turbo Pascal 5.5 is (for $34.95 to $75).  Does any
   have a good reason why I should buy it?  Particularly, how will "object-
   oriented" affect my current TB 4.0 code?  As with anybody else, I want
   to keep on top of things but I am not sure that my current programs 
   will not require drastic updates.  I appreciate any comments I get.

                                           Robert J. Morey

dmurdoch@watstat.waterloo.edu (Duncan Murdoch) (06/19/89)

In article <5534@rpi.edu> mcintyre@cs.rpi.edu (David McIntyre) writes:
>Robert Morey writes:
>>
>>   [ Robert is worried about upgrade problems to TP 5.5 from 4.0]
>>
>
>The upgrade to 5.5 should be almost non-existant.  The change from 5.0
>to 5.5 is comprised of 4 new keywords: object, virtual, constructor,
>and destructor.

The second part is not quite true:  there are a few more changes than that.
Most are extensions to the 4/5 syntax, so should present no problems.
These include changes to the New and Dispose procedures, and the addition
of a new Typeof procedure.

One change that did cause me some trouble is that the signature that gets put
into a TPU to tell the compiler whether it needs a new version has become
more picky.  In the Turbo Professional package, there's a unit (TPSTRING) 
that depends to a very small extent on whether the N+ flag is set. (It
affects the float type that gets converted to a string.)  Many units use
this unit.  I used to be able to keep two versions of TPSTRING, 
one compiled N+ and the other compiled N-.  I didn't need two versions of 
any unit that Use'd TPSTRING, unless it too depended on the N+ flag.  Now
in version 5.5 I do.  

I'm still not sure whether it was a bug in version 5.0 that let
me get away with what I was doing, or whether version 5.5 is being 
unnecessarily picky.

One change that seems to be a welcome relief is that (at last) the code
generator for Extended math seems to make efficient use of the coprocessor
stack.  It used to be that an expression like

  a := b+c+d+e+f+g+h+i+j+k+l;

would overflow the stack if all the variables were extended; this bug has
thankfully been fixed now.  For anyone translating numerical routines written
in Fortran, this alone would be worth the price of the upgrade.

Duncan Murdoch

ts@chyde.uwasa.fi (Timo Salmi LASK) (06/20/89)

In article <267@maytag.waterloo.edu> dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes:
>One change that seems to be a welcome relief is that (at last) the code
>generator for Extended math seems to make efficient use of the coprocessor
>stack.  It used to be that an expression like
>
>  a := b+c+d+e+f+g+h+i+j+k+l;
>
>would overflow the stack if all the variables were extended; this bug has
>thankfully been fixed now.  For anyone translating numerical routines written
>in Fortran, this alone would be worth the price of the upgrade.

This is beside the subjects of this area, but isn't it truly amazing
how we users have become conditinioned to pay for the corrections of
the bugs in the programs we have puchased.  Borland makes very good
products, and this is not a reflection on them, but the attitude has
really become ingrained in us.

...................................................................
Prof. Timo Salmi                                (Site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: vakk::salmi Bitnet: salmi@finfun

mcintyre@cs.rpi.edu (David McIntyre) (07/22/89)

Robert Morey writes:
>
>   [ Robert is worried about upgrade problems to TP 5.5 from 4.0]
>

The upgrade to 5.5 should be almost non-existant.  The change from 5.0
to 5.5 is comprised of 4 new keywords: object, virtual, constructor,
and destructor.

If you don't use the new keywords, there is no difference in the language.

However, the new keywords add some neat C++ish abilities, like dynamic
binding of functions, and more complete encapsulation.

For a really nice introduction to the new abilities of 5.5, check out
Michael Floyd's article "Turbo Pascal with Objects" in the July, 1989
issue of Dr. Dobbs.  It is a very good introduction article.  

I think that I am going to order the update next week.  I am going to
be teaching an advanced-programming/data structures course in August,
and I want to talk about some aspects of objective programming.  I will
give you all a short report about what I think after I give ita chance.

				-Dave


Dave "mr question" McIntyre     |      "....say you're thinking about a plate
mcintyre@turing.cs.rpi.edu      |       of shrimp.....and someone says to 
office : 518-276-8633		|	you `plate,' or `shrimp'......"
home   : 518-271-6664		|