[comp.sys.mac.programmer] OOP & LSP

-Cheshire-@cup.portal.com (Gary Edward Learned) (05/21/89)

I am in the process of redevising my skeleton program and pieces/parts
of code (after all, who codes from scratch?) to make use of an object
oriented stratagy.  As I am using Thinks LSP, I cannot use MacApp at this time
Has anyone already done this, and if so, what tips/code fragments/
suggested reading can you reccomend?
Thanks

siegel@endor.harvard.edu (Rich Siegel) (05/21/89)

In article <18612@cup.portal.com> -Cheshire-@cup.portal.com (Gary Edward Learned) writes:
>I am in the process of redevising my skeleton program and pieces/parts
>of code (after all, who codes from scratch?) to make use of an object
>oriented stratagy.  As I am using Thinks LSP, I cannot use MacApp at this time
>Has anyone already done this, and if so, what tips/code fragments/
>suggested reading can you reccomend?

	I've done precisely this; I have a program of moderate size (~20,000
lines of code, 170K built) that uses multiple document types, and 
as such was an ideal candidate for a rewrite in Object Pascal. There are no
special tricks,  but remember that inheritance is your friend. In some cases
I was able to cut the amount of source in half or even more...

	The program took about two weeks to rewrite, and is much easier to 
debug and maintain, since in many cases there's only one set of UI code
to maintain.

		--Rich


~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

 "She told me to make myself comfortable, so I pulled down my pants
 and sat in the pudding." -Emo Phillips
~~~~~~~~~~~~~~~

cash@csmil.umich.edu (Howard Cash) (05/22/89)

                   <1887@husc6.harvard.edu> Rich Siegel wrote:
$> [part of original question about converting from conventional to 
$> object code]
$
$      I've done precisely this; I have a program of moderate size (~20,000
$ lines of code, 170K built) that uses multiple document types, and 
$ as such was an ideal candidate for a rewrite in Object Pascal. There are no
$ special tricks,  but remember that inheritance is your friend. In some cases
$ I was able to cut the amount of source in half or even more...
$
$      The program took about two weeks to rewrite, and is much easier to 
$ debug and maintain, since in many cases there's only one set of UI code
$ to maintain.

$  Rich Siegel
$  Staff Software Developer
$  Symantec Corporation, Language Products Group

I am writing a fairly large program using LSC and this kind of posting 
gives me pause.  Apple Computer tells us we shoutld all concentrate on
object oriented languages.  A respected engineer at the company that 
MAKES my favorite C compiler says that Object Pascal improves the 
maintainability of his software.

Question:  Am I making a mistake by doing my development in LSC?

howard cash                               "I think, therefore I earn"  -dc
cash@csmil.umich.edu
Phone: (313)663-0156

siegel@endor.harvard.edu (Rich Siegel) (05/22/89)

In article <1079@mailrus.cc.umich.edu> cash@csmil.umich.edu (Howard Cash) writes:
>object oriented languages.  A respected engineer at the company that 
>MAKES my favorite C compiler says that Object Pascal improves the 
>maintainability of his software.
>
>Question:  Am I making a mistake by doing my development in LSC?

	I didn't mean to scare anyone into using Object Pascal....

	1) Object orientation can be achieved without using an object-
	oriented language.  It's just easier with Object Pascal (or C++,
	or whatever).

	2) Symantec sneak-previewed a versoin of THINK C with object-
	oriented extensions. We *will* come out with object support
	in THINK C, so worry not.

The answer to your question is "no". :-) Several major software
vendors can't be all wrong....

		--Rich


~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

 "She told me to make myself comfortable, so I pulled down my pants
 and sat in the pudding." -Emo Phillips
~~~~~~~~~~~~~~~

mec@mtfmi.att.com (M.CONNICK) (05/22/89)

In article <1079@mailrus.cc.umich.edu> cash@csmil.umich.edu (Howard Cash) writes:

> I am writing a fairly large program using LSC and this kind of posting 
> gives me pause.  Apple Computer tells us we shoutld all concentrate on
> object oriented languages.  A respected engineer at the company that 
> MAKES my favorite C compiler says that Object Pascal improves the 
> maintainability of his software.
> 
> Question:  Am I making a mistake by doing my development in LSC?

If you'll get ahold of the shareware OIC (Objects in C) package,
you'll be able to do object-oriented programming in Lightspeed C. OIC
is very slick, I even prefer it to the C++ I use here at Bell Labs
under UNIX.

-----------------------------------------------------
Michael Connick    att!mtfmi!mec        201-957-3057
AT&T Bell Labs     MT 3F-113	        (Dept. 79153)

bill@utastro.UUCP (William H. Jefferys) (05/23/89)

In article <1091@mtfmi.att.com> mec@mtfmi.UUCP (79153-M.CONNICK) writes:
#
#If you'll get ahold of the shareware OIC (Objects in C) package,
#you'll be able to do object-oriented programming in Lightspeed C. OIC
#is very slick, I even prefer it to the C++ I use here at Bell Labs
#under UNIX.

Where can one find this?

Bill Jefferys

-- 
Glend.	I can call spirits from the vasty deep.
Hot.	Why, so can I, or so can any man; But will they come when you
	do call for them?    --  Henry IV Pt. I, III, i, 53

mec@mtfmi.att.com (M.CONNICK) (05/23/89)

In article <3926@utastro.UUCP> bill@astro.UUCP (William H. Jefferys) writes:

> In article <1091@mtfmi.att.com> mec@mtfmi.UUCP (79153-M.CONNICK) writes:
> #
> #If you'll get ahold of the shareware OIC (Objects in C) package,
> #you'll be able to do object-oriented programming in Lightspeed C. OIC
> #is very slick, I even prefer it to the C++ I use here at Bell Labs
> #under UNIX.
> 
> Where can one find this?

I believe it's available on Compuserve. It was sent to me as a file
attachment over Fidonet from someone who knows my interest in OOPS.
I'll also make it available for download from our BBS at 201-988-0706
(300/1200/2400/9600 baud HST). In addition I'll make the file
requestable as OIC from us over Fidonet at 1:107/412 or Alternet
7:520/412. We're running Tabby 2.0 on our Mac (no surprise, since I'm
the author of Tabby!).

It's a very nice library of object oriented functions that comes as an
LSC 3.0 project. The author says that converting to other Mac C
environments should be easy. It supports generic functions, multiple
inheritance, and provides a very sophiticated object-oriented
programming language. It's based on Smalltalk and LOOPS in its
philosophy. It's much more like Objective C than C++. It also comes
with a bare-bones set of foundation classes based on Smalltalk's.

Prior to getting a copy of OIC, I had built my own "home-grown" OOPS
environment on top of LSC 3.0. After seeing what OIC offers, I canned
my system and started immediately converting over to using it for all
my software development. I've already ported over my File, Dialog Box,
and List Manager classes to it without problems.

The package is shareware and the author asks for ONLY $20.00 for it! He
also has some VERY ambitious plans for expanding it into a complete
OOPS, with a browser and a complete LISP interpreter built-in. It's
already very useable, if you have have a good understanding of
OOPS and C. The documenation makes it very clear that this system is
NOT for the novice programmer, in its current early development state.

-----------------------------------------------------
Michael Connick    att!mtfmi!mec        201-957-3057
AT&T Bell Labs     MT 3F-113	        (Dept. 79153)

perry@key.COM (Perry The Cynic) (05/24/89)

In article <1889@husc6.harvard.edu> siegel@endor.UUCP (Rich Siegel) writes:
> 	2) Symantec sneak-previewed a versoin of THINK C with object-
> 	oriented extensions. We *will* come out with object support
> 	in THINK C, so worry not.

Oops. Does that mean that you'll try to 'roll your own' object support
for LSC, rather than adopt C++? If so, why? If not, please allay my
fears (only 1/3 :-).

Also (though I should know better than to ask), can you give us an idea as
to when it will be available? (Well, I can *try*...)

Thanks
  -- perry
-- 
------------------------------------------------------------------------
Perry The Cynic (Peter Kiehtreiber)		     perry@arkon.key.com
** What good signature isn't taken yet? **	   ...!pacbell!key!perry

siegel@endor.harvard.edu (Rich Siegel) (05/24/89)

In article <841@key.COM> perry@arkon.key.COM (Perry The Cynic) writes:
>
>Oops. Does that mean that you'll try to 'roll your own' object support
>for LSC, rather than adopt C++? If so, why? If not, please allay my
>fears (only 1/3 :-).

	I generally don't answer any question more than 10**n times, where
n is any positive nonzero integer.....

	The language that we present will be upward-compatible with C++.

		--Rich
~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

 "She told me to make myself comfortable, so I pulled down my pants
 and sat in the pudding." -Emo Phillips
~~~~~~~~~~~~~~~