Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!im4u!milano!sierchio From: sierchio@milano.UUCP Newsgroups: comp.lang.misc Subject: Re: Teaching object-oriented paradigm to beginners? Message-ID: <3288@milano.UUCP> Date: Thu, 8-Jan-87 18:13:42 EST Article-I.D.: milano.3288 Posted: Thu Jan 8 18:13:42 1987 Date-Received: Thu, 8-Jan-87 23:48:19 EST References: <4000001@nucsrl.UUCP> Sender: sierchio@milano.UUCP Organization: MCC, Austin, TX Lines: 70 Summary: MERITS OF OBJ-ORIENTED APPROACH Basically, there are several main advantages to the object-oriented approach. One is the modularity. Major portions of programs at several levels in the hierarchy can change the way they work without changing everything else (IMAGINE! for those of you still using C or Pascal or such). This is because one gets information to and from other objects via a convention called message-passing. An object has variables in which are contained values known only to itself. It also has METHODS, which are essentially functions, procedures, etc. Say you have an object BLAH. BLAH has variables Color and Size. We create an INSTANCE of BLAH, and call it CHARLEY (essentially, this is like saying, in C, "BLAH CHARLEY;"). Now, CHARLEY is an object of type BLAH, meaning that BLAH is the CLASS of CHARLEY. BLAH objects inherit certain methods common to all objects. Suppose we want to discover CHARLEY's Color -- then we send CHARLEY a message and CHARLEY responds with the value of Color. Now, suppose at a future date, Color is no longer a variable in objs of type BLAH, but is calculated as a result of some process-- it doesn't matter. You still send the same message to CHARLEY. From the outside, you don't know if what you're asking for exists, or is made for you. Neat, huh? You can see that for the novice, it's a natural. You don't need to know anything about an object other than its name, and what kind of things you might want to ask about it. I recommend that you investigate the object-oriented extensions to Lisp, LOOPS and FLAVORS. I am currently using Franz Common Lisp with Flavors as one of the extension packages. It runs on many UNIX machines, since it was written in C under BSD Unix, and I like it a lot. Is Gilbert Krulee still there? If so, please tell him hi from me. He may not remember, but no matter. Write me via e-mail, and let me know how it's going. And if Krulee has an e-mail address, send it along to me. There's a wealth of literature on Smalltalk -- good to peruse. I mentioned Lisp because I know it's an available language, and it can be a good language for novice programmers who haven't learned any bad thinking habits yet from procedural languages, and it supports object-oriented programming. so much for my ramblings. Good Luck, Michael Sierchio UUCP: ut-sally!im4u!milano!sierchio ARPA: sierchio@mcc.ARPA -- Michael Sierchio @ MCC Software Technology Program UUCP: ut-sally!im4u!milano!sierchio ARPA: sierchio@mcc.ARPA "WE REVERSE THE RIGHT TO SERVE REFUSE TO ANYONE"