🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #4635

Re: OBJ2 and Smalltalk

#4635
From: shebs
Date: Sat, 31 Jan 1987 18:11
85 lines
4841 bytes
In article <741@unc.unc.UUCP> rentsch@unc.UUCP (Tim Rentsch) writes:

>Because my opposite seems more interested in scoring debate points
>than shedding light on the subject,

I really shouldn't respond to articles prefaced with ad hominem remarks,
but I don't feel like working today...

>Q: 'Do variables have type-specifications?'
>OBJ2: yes.  Smalltalk: no.

>Q: 'Can the value of a variable be an object of any type at any time?'
>OBJ2: no.  Smalltalk: yes.

I mentioned previously that the existence of a universal sort makes the
question of the type of a variable uninteresting.  Here's a quote:
"... to be implemented soon are: a `universal' sort U -- this will give
a tremendous flexibility in programming style, since it supports arbitrary
mixtures of typed and *untyped* code; ..." (emphasis mine).  Theoretical
works seem to be split on the desirability of a universal type, but I think
programming practice demands it.

>Q: 'Is the language compiled?'
>OBJ2: no.  Smalltalk: yes.

Do you mean to say there are no Smalltalk interpreters?  I still don't
understand what compilation has to do with language design...  Compilation
is an optimization - part of the implementor's bag of tricks!

>Q: 'Is the language suitable for direct (compiled) execution on a
>  more-or-less conventional computer architecture?'
>OBJ2: no.  Smalltalk: yes.

People used to say that Lisp was not suitable for compiled execution,
at least until Lisp compilers met or bettered procedural language compilers.
(See Brooks' compiler paper in last summer's Lisp conference, and the
Orbit compiler paper in the last compiler conference for recent examples.)
Prolog is another language that is obviously unsuitable for conventional
machines, but David Warren's compiler was written ten years ago, and it
achieved performance that has rarely been matched since.  Don't bet on
what kind of compilers for rewrite systems will be written in the next ten
years (may try my hand at it myself, once this thesis is out of the way).

Smalltalk is suitable for conventional machines because the lowest levels
of semantics (within a method) are basically procedural.

>OBJ2:  The equality predicates of initial algebra semantics require
>in the worst case unbounded computing time.  (At least, I think they
>do, and I think that OBJ2 allows as much expressive power in its
>equality predicates.)  Certainly hardware could be built to execute
>these 'directly', but I argue that any machine instruction which may
>not terminate is not 'more-or-less conventional computer
>architecture'.

"Nontermination of rewriting" is a red herring.  It just means that it
is possible to write infinite loops in rewrite systems.  The theoreticians
are unhappy about it because they would like guarantees that infinite
loops can't happen, but of course the theoreticians also tell us that
it is impossible to detect all infinite loops!  A compiler for a rewrite
system will most likely compile a rule into a collection of instructions,
in much the same way that a Warren-style Prolog compiler works.  You don't
have to assume broadly powerful instructions, just an adequate compiler
algorithm.

>My conclusion, for
>those of you who haven't guessed it, is that OBJ2 is significantly
>different from Smalltalk.

This reminds me a lot of functional language vs Lisp debates.  As a Lisper
I always end up taking the moral low ground, while David Turner publishes
memorable but scurrilous quotes to the effect that Lisp has held back
functional programming by at least ten years.  ADT vs OOP has the same 
flavor - ADT languages have formal semantics, while Smalltalk and Simula
have operational definitions; ADT languages are hard to use and not
practical for programming, while OOP languages are designed to meet
the needs of the moment and are eminently usable.  Like Lisp and its
purely functional brethren, although OOP and ADT languages share a common
foundation, the adherents of each contend over matters that seem totally
trivial to nonspecialists.  I find the disagreements distasteful, particularly
when attempts at reconciliation are themselves reviled as supporting the other
side.  So this is my last article on the subject.

>Tim

							stan shebs
Technical Details
Message-ID: <4243@utah-cs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!mit-eddie!husc6!ut-sally!utah-cs!shebs
References: <4000001@nucsrl.UUCP> <3288@milano.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!mit-eddie!husc6!ut-sally!utah-cs!shebs
From: shebs@utah-cs.UUCP
Newsgroups: comp.lang.misc
Subject: Re: OBJ2 and Smalltalk
Message-ID: <4243@utah-cs.UUCP>
Date: Sat, 31-Jan-87 13:11:30 EST
Article-I.D.: utah-cs.4243
Posted: Sat Jan 31 13:11:30 1987
Date-Received: Sat, 31-Jan-87 23:46:00 EST
References: <4000001@nucsrl.UUCP> <3288@milano.UUCP>
Reply-To: shebs@utah-cs.UUCP (Stanley Shebs)
Organization: PASS Research Group
Lines: 85