Subject: Object Oriented Programming in NeWS

From: [email-masked]
Date: Fri, 27 Mar 87 22:36:20 EST

Date: Fri, 27 Mar 87 22:31:49 EST
From: Don Hopkins <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Subject: Object Oriented Programming in NeWS

   Date: Tue, 3 Mar 87 09:29 EST
   From: Robert Scheifler <[email-masked]>
   Subject: Object Oriented Programming in NeWS
   To: [email-masked]

   (Flames for that nice charcoal flavor :-)

Yo modem! Dat's right! I said yo modem! c(-;

       It's an excellent example of the elegance and power of
       PostScript, and shows how one can use object oriented
       programming to build flexable, easy to modify user interface
       mechanisms in NeWS.

   Gee, perhaps you should all stop programming in C (or whatever),
   and program exclusively in this language designed by afterthought.
   As one who uses an OOPS in everyday programming, I tend to yawn at
   this.

Well wake up and smell the coffee. PostScript, which grew out of
Xerox's Interpress, is a very well developed language, hardly designed
by afterthought. The object oriented extension to PostScript is based
on Smalltalk's message passing model.  In two pages, it's a very neat
implementation of Smalltalk message passing.  I would be interested to
know how many pages of code it takes to put a message passing
extension into the C language, as C++ does. True, that's not fair; C
isn't an extensible language. So how many pages of code does it take
to implement Flavors for the Lisp Machine? Smalltalk message passing
is a whole lot cleaner than Lisp Machine Flavors. As much as I love to
worship at the alter of feeping creaturism, the functionality to size
ratio is what really counts.

No, there is no need to stop programming in C, or program in any
language exclusively. You can create and use objects and functions
that are defined in (or translated to) PostScript, from other
languages, by creating a "veneer" over the PostScript interface.

   If this is so important, perhaps it would have been better to start
   with Smalltalk and embed the PostScript graphics model in it, and
   get compiled code performance along the way.

Can you name any laser printers that understand Smalltalk? PostScript
is a standard page description language. There are good reasons for
PostScript's wide acceptance. I see it as a very powerful, flexable,
general purpose programming language, that happens to have a fantastic
set of graphics functions built in.

   OOP is fine, but this is just another indication that stability of
   the NeWS interface may not be all that easy to maintain (not to say
   that X is any better, just that it may not be any worse).

I am curious: how is it that you think object oriented programming
could hinder the maintenance of a stable interface? The X Toolkit
certainly takes an object oriented approach!

   Suppose Sun had taken a few more months to discover this hack, and
   NeWS had shipped without it?  What happens when they come up with a
   better class hierarchy?

For some reason, I don't think Sun would quite have the chutzpah to
claim that they "discovered this hack" called message passing.
(Apple, on the other hand ... )

   Gosling stated at COMPCON that the NeWS environment was getting
   rather nice, (interactive, OOP, debugger, etc.) so much so that
   people at Sun were being seduced into downloading too much code.
   When asked what "too much" was, he said a 5000 line PostScript
   program was an example of too much.  This power might well price
   NeWS right out of the low-end terminal (not workstation) market (if
   you believe such a market will develop).

With NeWS, you only have to download the code that you want, when you
need it. It doesn't have to be already linked into the server, as with
X. This lack of power probably won't price X out of the low-end
terminal market.

   I think NeWS is a great of example of solving the right problems,
   but probably in the wrong way.  If people instead committed to
   crawling out of the non-incremental, non-interactive, non-OOP world
   of C, and worried about shared libraries and other facilities, they
   might find the entire next generation of applications a whole lot
   easier to write and maintain, not just the display frontends of
   some applications.

Great! Rah! Rah! Save the heathens! Let them eat Mach! So what are you
suggesting? Should we all run out and buy Lisp Machines? ^U ^U c(-;

	-Don