djd@mit-eddie.MIT.EDU (Dave D'Souza) (01/22/87)
I am interested in receiving a little more information about MPW Pascal. I know it is an object oriented language but I read somewhere (perhaps in this or the o-o languages newsgroup) that Object Pascal doesn't allow class definitions. I am curious as to how one creates object and methods in this language. Is is somewhat like lisp's flavors? I don't have MPW Pascal (or MPW) so I would appreciate any info. Source code to a simple example program (it doesn't have to compile) would be much appreciated. I just want to know if it is worth purchasing MPW for its object-oriented implementation. Thanks.
lsr@apple.UUCP (Larry Rosenstein) (01/22/87)
In article <4629@mit-eddie.MIT.EDU> djd@eddie.MIT.EDU (Dave D'Souza writes: > >I am interested in receiving a little more information about MPW >Pascal. I know it is an object oriented language but I read somewhere >(perhaps in this or the o-o languages newsgroup) that Object Pascal >doesn't allow class definitions. I am curious as to how one creates >object and methods in this language. Is is somewhat like lisp's >flavors? > Object Pascal does not support class objects or class methods, but does allow you to define new classes (object types). For example, you can define a general Shape object type that specifies a certain interface and then define subclasses of Shape for Rectangle, Circle, etc. It is possible to write code that sends messages to Shape objects without knowing if they are in fact Rectangles, Circles, etc. It is easy to create a new subclass of shape and install it into your program. For more information on Object Pascal you can look up Kurt Schmucker's book "Object-Oriented Programming on the Macintosh" (published by Hayden). There have been articles in the August 1986 BYTE, the November & December 1986 MacWorld, and the Decemer 1986 MacTutor. Most of these articles talk about MacApp as well as Object Pascal. MacApp is an application framework written in Object Pascal that uses the object-oriented extensions. MacApp defines several object types (View, Document, Command), which the programmer subclasses. Your application inherits the common Macintosh user interface (windows, menus, DAs, etc.) from MacApp. >Source code to a simple example program (it doesn't have to compile) >would be much appreciated. I just want to know if it is worth The December MacTutor article that I wrote contained the source code for a simple game program on the Macintosh. That should give you an idea of what Object Pascal is like. -- Larry Rosenstein Object Specialist Apple Computer AppleLink: Rosenstein1 UUCP: {sun, voder, nsc, mtxinu, dual}!apple!lsr CSNET: lsr@Apple.CSNET
johnson@uiucdcsp.UUCP (01/23/87)
A good way to learn about Object Pascal and MacApp is to get the book "Object-oriented Programming on the Macintosh" by someone whose name I forget. I have only read it, not used it as a guide to programming the Mac, but it seemed like a good book.
lsr@apple.UUCP (01/30/87)
In article <76000002@uiucdcsp> johnson@uiucdcsp.cs.uiuc.edu writes: > >A good way to learn about Object Pascal and MacApp is to get the book >"Object-oriented Programming on the Macintosh" by someone whose name >I forget. The author is Kurt Schmucker; the published Hayden.
joel@gould9.UUCP (01/31/87)
Re: "Object-Oriented Programming for the Macintosh", it is not only the best book about Object Pascal and object-oriented programming for the Macintosh, it is the ONLY book. :-) The author is Kurt Schmucker, who's also written about MacApp (which uses Object Pascal) for Byte and MacTutor. The book is by Hayden and is sold through APDA. If you're interest in Object Pascal, I strongly recommend getting the 12/86 issue of MacTutor. There's stuff there that's beyond the tutorial stage, but you'll definitely want it later on. -- Joel West MCI Mail: 282-8879 Western Software Technology, POB 2733, Vista, CA 92083 {cbosgd, ihnp4, pyramid, sdcsvax, ucla-cs} !gould9!joel joel%gould9.uucp@NOSC.ARPA