comp.lang.ada
 help / color / mirror / Atom feed
From: billwolf@hubcap.clemson.edu (William Thomas Wolfe,2847,)
Subject: Re: Procedure types and dynamic binding
Date: 10 Jan 89 03:01:32 GMT	[thread overview]
Message-ID: <4055@hubcap.UUCP> (raw)
In-Reply-To: 5804@medusa.cs.purdue.edu

From article <5804@medusa.cs.purdue.edu>, by rjh@cs.purdue.EDU (Bob Hathaway):
>> In more complicated examples parameterizable operations for each Adt 
>> instance could simplify the program considerably, such as by avoiding
>> nested case statements.
>>
>>> [...] we must provide MAKE_*_PRINT, where * represents an indefinite set
>>> of cases.  We now see that our old friend, the case statement, is
>>> not gone; it has simply taken on a new form. 
> 
> This is not entirely correct, since I commented another more general solution.

     Then let's have a concrete example of this other, more general solution.

     Be generous with the comments.

% Also, it appears unrestricted pointers to subprograms, if thats what
% you propose, would provide dynamically checked operations at runtime.
% This mechanism is more powerful than statically checked procedural
% variables.  

     No, I haven't yet been convinced that subprograms should constitute
     a separate type; my current position is that subprograms should only
     be a means by which ADTs and tasks (think of a "main program" as an
     isolated task...) can be specified.  If you can convince us that there
     is a legitimate need for a subprogram type, then variables of the type
     and pointers to objects of the type will follow automatically.  

> Mats Weber writes:
>>I think there is one good reason why procedure types should not be included in
>>the Ada language: A secure implementation of procedure types must restrict
>>their use to global procedures (that is, procedures that are not nested in
>>other procedures or tasks), as is the case in Modula-2.

     Quick question: assuming the idea of a specification is expanded to
     include all externally accessible objects, what is the source of
     the insecurity?

% Graphical environments provide one example where dynamically parameterizable
% objects can be of great assistance.  One could parameterize graphical objects 
% with operations for displaying output, windows, etc., with each instance using
% the correct subprogram to implement its display operations.

     Specific examples, please...



                                           Bill Wolfe

                                    wtwolfe@hubcap.clemson.edu

  reply	other threads:[~1989-01-10  3:01 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, [this message]
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,
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