From: billwolf@hubcap.clemson.edu (William Thomas Wolfe,2847,)
Subject: Re: Procedure types and dynamic binding
Date: 11 Jan 89 14:24:42 GMT [thread overview]
Message-ID: <4062@hubcap.UUCP> (raw)
In-Reply-To: 5816@medusa.cs.purdue.edu
From article <5816@medusa.cs.purdue.edu>, by rjh@cs.purdue.EDU (Bob Hathaway):
> [much verbiage deleted...]
>
> class STACK is
> type OPERATION_TYPE is procedure;
> procedure OPERATION (ELEMENT : in polymorphic;...);
> procedure CHANGE_OPERATION (NEW_OPERATION : OPERATION_TYPE);
> function GET_OBJECT return polymorphic;
> end STACK;
First, let's clarify the terminology: a STACK is an example of a type.
A class is a group of related types. Thus, APPLE and ORANGE are types,
and FRUIT is a class of types. OBJECT is the class of all possible types.
Despite the request that you be generous with the comments, no indication
was given as to what OPERATION has to do with the stack. Let's assume
that it is some operation that one wishes to apply to every item in the
stack. Then we encounter problems in that OPERATION has only an "in"
parameter, and therefore cannot modify its parameter. But we'll overlook
this too, and ask: If we're looking at objects which need to be modified,
1) what are they doing hidden away inside a stack? 2) why can't we just
have a stack of pointers, and write a procedure which will serially read
the stacked objects and update what they point to? and 3) what if the user
wants to keep N different operations which could be applied to all items
in the stack, without the bother of continuously invoking CHANGE_OPERATION?
The mechanism whereby a program could edit source files, cause a rec
recompilation, transfer its local knowledge to its successor, and
then destroy itself is appropriate to an environment where code
modifications are infrequent; the system transitions from one well-defined
state to another, and the source code always represents the current
state of the system. Additionally, optimized code can be generated.
Procedural variables would encourage excessive rates of change, and
would greatly complicate the problem of code optimization.
The idea of modifying the display routine of a graphical object
through procedural variables has no merit. What should be modified
is a standardized data structure such as a bit-map or list of endpoints.
This is analogous to the inappropriate use of recursion (vs. iteration).
> If Ada is to continue remaining viable as a state-of-the-art programming
> language then incremental extensions such as procedural variables [...]
Ada is a state-of-the-art applications programming language, not
a state-of-the-art research language. Perhaps a more appropriate
approach to procedural variables would be to incorporate them into
a research language and look for a) efficient implementations,
including code optimization, and b) realistic situations in which
the use of procedural variables is effectively not optional.
Bill Wolfe
wtwolfe@hubcap.clemson.edu
next prev parent reply other threads:[~1989-01-11 14:24 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
1988-12-30 21:42 Procedure types and dynamic binding Erland Sommarskog
1988-12-31 17:46 ` Bob Hathaway
1989-01-05 10:02 ` William Thomas Wolfe,2847,
1989-01-07 18:05 ` Bob Hathaway
1989-01-07 21:21 ` William Thomas Wolfe,2847,
1989-01-08 1:49 ` Bob Hathaway
1989-01-08 19:01 ` William Thomas Wolfe,2847,
1989-01-08 23:10 ` Bob Hathaway
1989-01-09 1:47 ` William Thomas Wolfe,2847,
1989-01-09 20:19 ` Bob Hathaway
1989-01-10 3:01 ` William Thomas Wolfe,2847,
1989-01-10 3:06 ` Bob Hathaway
1989-01-10 19:11 ` William Thomas Wolfe,2847,
1989-01-11 2:08 ` Bob Hathaway
1989-01-11 14:24 ` William Thomas Wolfe,2847, [this message]
1989-01-11 17:51 ` Barry Margolin
1989-01-11 22:54 ` William Thomas Wolfe,2847,
1989-01-12 13:57 ` Robert Firth
1989-01-12 19:09 ` William Thomas Wolfe,2847,
1989-01-14 0:46 ` Scott Moody
1989-01-15 18:28 ` William Thomas Wolfe,2847,
1989-01-24 4:07 ` Paul Stachour
1989-01-12 0:58 ` William Thomas Wolfe,2847,
1989-01-12 6:12 ` Barry Margolin
1989-01-11 14:48 ` Submitting Ada 9X revision requests William Thomas Wolfe,2847,
1989-01-11 2:10 ` Procedure types and dynamic binding Bob Hathaway
1989-01-05 7:38 ` William Thomas Wolfe,2847,
-- strict thread matches above, loose matches on Subject: below --
1989-01-06 23:04 Erland Sommarskog
1989-01-07 22:20 ` William Thomas Wolfe,2847,
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox