[comp.lang.misc] The paradigm of Icon

gudeman@arizona.edu (David Gudeman) (01/09/89)

In article  <2630@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>I ... define a procedural language as one in which all modules have
>a parent-child relationship with each other.

That strikes me as a peculiar definition.  One could rule out any
language with a goto.  Each to his own, but it would help if you would
make such non-standard definitions clear earlier in a discussion.

> I also don't classify languages
>by implementation details... for example, SmallTalk uses messages to pass
>data between procedures, but since they generally have a parent-child
>relationship (one calls the other) they're still procedures.

Actually, I suspect that SmallTalk is implemented with procedure
calls.  The important thing is that it encourages the programmer to
think of programming as the creation of objects and to think of
computation as the interaction of objects, so it is called an
object-oriented language.

>Icon uses
>a stack to pass a stream of data between concurrently executing modules.
>They have a source/drain relationship. It's non-procedural.

Since Icon doesn't have Modula-style modules can I assume you are
using the term generically and mean ``expressions''?  Also, Icon
doesn't have streams or concurency (or anything much like concurency),
so I'm having trouble visualizing anything in Icon that fits this
description, can you give an example?  Maybe it would help if you
defined your terms.
					David Gudeman

					    Department of Computer Science
gudeman@arizona.edu			    Gould-Simpson Science Building
{allegra,cmcl2,ihnp4,noao}!arizona!gudeman  The University of Arizona
602-621-2858				    Tucson, AZ 85721

pardo@june.cs.washington.edu (David Keppel) (01/10/89)

>In article  <2630@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>>[define "procedural language": all modules have parent-child
>> relationship]
>>[Smalltalk uses messages, but generally have parent-child
>> relationship => procedures]

gudeman@arizona.edu (David Gudeman) writes:
>[I suspect Smalltalk is implemented with procedure calls]

A common piece of Smalltalk is

    method1
	(boolVar) ifTrue: [block]

The ``calling'' sequence is as follows:

	Method1 is invoked.  This allocates call frame f1.
	The method "ifTrue:" is called with parameter "block".
		This allocates call frame f2.
	If the reciever "boolVar" is the value "True", then the
		argument "block" is executed IN CALL FRAME F1.

Thus, the block argument (closure) is executed in the environment of
some parent and this is *not* a parent-child calling order.  Of course
parent-child ordering *can* happen, it just isn't such a general case.

	;-D on  ( My own silly opinion )  Pardo
-- 
		    pardo@cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo