Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: The OO appr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 30 of 36 Topic 3978 of 4288
Post > Topic >>

Re: The OO approach

by Elizabeth D Rather <erather@[EMAIL PROTECTED] > Mar 29, 2008 at 07:30 AM

Jonah Thomas wrote:
> I've consistently avoided OO. I've tried to avoid problems that are
> complicated enough for OO to be valuable.
> 
> But various recent clf posts have given me the idea that these days,
> avoiding OO is like avoiding structured programming. You can maintain
> software adequately without formal structuring, but there's no point
> trying to get anybody to believe you.
....

OO is a tool.  Like many other tools, it's designed for a particular 
class of problems.  It is not a panacea for all programming, but is 
extremely valuable for the right kinds of problems.

Chuck Moore independently developed an OO system for image processing in 
the mid-70's.  Called "imageFORTH" it was used in a number of 
installations with different image processing equipment and different 
applications.  In this scheme, the basic object was an "image".  It had 
properties (dimensions, resolution, etc.), and methods (read-line, 
write-line).  It had inheritance, polymorphism, and all the other 
features that later characterized OOP.  But the key concept was the 
identification of an *image* as an entity with these properties, so that 
you could define images that resided on disk, screen, or printer, for 
example, and apply common commands.  For example, to display an image 
named Image1 which resided on disk on the screen, you could say,

	DISK IMAGE1 SOURCE SCREEN DEST PASS

or route the displayed image to the printer by saying,

	SCREEN SOURCE PRINTER DEST PASS

(there was a lot more to it than that, this is just a superficial 
description)

Putting together applications on top of this structure became extremely 
simple and readable.

We next encountered objects when working on an industrial 
process-control application in the mid-80's.  By this time, there was a 
lot of literature on OOP, and we were able to formalize our objects more 
conventionally.  This application area had a lot of devices that fell 
into cl*****:  conveyors, lifts, dumpers, gates, etc. Each class had 
characteristic properties (control points, states, etc.) and methods 
(OPEN, CLOSE, START, STOP, etc.).  At the same time, we extended OOP 
features into our data base toolset, objectifying file cl*****, methods, 
etc.

GUI programming is a natural op****tunity for the kinds of 
simplifications that result from an appropriate use of OOP strategies, 
since there are many cl***** of objects (windows, dialog boxes, radio 
buttons, etc.) with common requirements, so we added SWOOP to SwiftForth.

However, there are also a very great many situations in which OOP is not 
appropriate, such as most embedded control programs that are entirely 
procedural.  If you *have* an app with identifiable cl***** of objects, 
OOP techniques can provide enormous simplification at the higher levels 
of the application.  If you don't, it won't do anything for you.  So, 
it's not appropriate to say "OOP has failed" or even "OOP is great".  It 
*can* be great if the situation is appropriate.

Cheers,
Elizabeth

-- 
==================================================
Elizabeth D. Rather   (US & Canada)   800-55-FORTH
FORTH Inc.                         +1 310-491-3356
5155 W. Rosecrans Ave. #1018  Fax: +1 310-978-9454
Hawthorne, CA 90250
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================
 




 36 Posts in Topic:
The OO approach
Jonah Thomas <jethomas  2008-03-27 18:11:17 
Re: The OO approach
Bruce McFarling <agila  2008-03-27 18:58:22 
Re: The OO approach
John Passaniti <nntp@[  2008-03-28 21:10:34 
Re: The OO approach
Bruce McFarling <agila  2008-03-28 22:50:39 
Re: The OO approach
John Passaniti <put-my  2008-03-29 15:17:29 
Re: The OO approach
kenney@[EMAIL PROTECTED]   2008-03-30 10:56:21 
Re: The OO approach
Bruce McFarling <agila  2008-03-29 17:09:06 
Re: The OO approach
kenney@[EMAIL PROTECTED]   2008-03-30 10:56:21 
Re: The OO approach
Bruce McFarling <agila  2008-03-30 10:13:54 
Re: The OO approach
John Passaniti <john.p  2008-03-27 23:14:16 
Re: The OO approach
Gerry <gerry@[EMAIL PR  2008-03-28 03:40:23 
Re: The OO approach
Albert van der Horst <  2008-03-28 10:59:05 
Re: The OO approach
John Passaniti <nntp@[  2008-03-28 16:30:25 
Re: The OO approach
Bruce McFarling <agila  2008-03-28 08:40:42 
Re: The OO approach
"Jenny Brien" &  2008-03-28 17:44:14 
Re: The OO approach
Bruce McFarling <agila  2008-03-28 09:02:15 
Re: The OO approach
Bruce McFarling <agila  2008-03-28 11:08:40 
Re: The OO approach
William James <w_a_x_m  2008-03-29 14:30:10 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-28 07:11:12 
Re: The OO approach
Bernd Paysan <bernd.pa  2008-03-28 14:18:04 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-28 08:32:11 
Re: The OO approach
John Passaniti <nntp@[  2008-03-28 20:57:19 
Re: The OO approach
Helmar <helmwo@[EMAIL   2008-03-28 12:48:52 
Re: The OO approach
Doug Hoffman <no.spam&  2008-03-29 08:57:02 
Re: The OO approach
Bruce McFarling <agila  2008-03-29 09:41:35 
Re: The OO approach
Bruce McFarling <agila  2008-03-29 09:56:23 
Re: The OO approach
Bruce McFarling <agila  2008-03-29 10:44:15 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-29 12:08:22 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-29 12:39:02 
Re: The OO approach
Elizabeth D Rather <er  2008-03-29 07:30:55 
Re: The OO approach
Bruce McFarling <agila  2008-03-29 10:54:20 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-29 13:34:25 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-29 22:33:31 
Re: The OO approach
John Passaniti <nntp@[  2008-03-30 06:09:07 
Re: The OO approach
Andrew Haley <andrew29  2008-03-30 10:06:31 
Re: The OO approach
Jonah Thomas <jethomas  2008-03-30 08:39:30 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 8:38:50 CDT 2008.