comp.lang.ada
 help / color / mirror / Atom feed
From: holden@cca.UUCP (Russ Holden)
Subject: Re: ForTran-Ada + flamette + questi
Date: Sat, 21-Jun-86 23:00:05 EDT	[thread overview]
Date: Sat Jun 21 23:00:05 1986
Message-ID: <8499@cca.UUCP> (raw)
In-Reply-To: 4700042@ada-uts

I know this has been beaten to death (and put to sleep) but...

> >>  Rich, you are missing out on the beauty of procedure passing.
> >>  Simply put it gives you the ability to dynamically bind actions
 
> So does the enumeration-to-procedure mapping method I proposed.
> 
> To be more concrete, the following outlines a package spec which
> one could use:
> 
>     package Mapper is
> 
>           type No_Argument_Procedure_Pointer is (
>               proc_A_0, proc_B_0, ... );
> 
>           type One_Integer_Argument_Procedure_Pointer is (
>               proc_A_1_int, proc_B_1_int, ... );
>                    :
> 
>           procedure Call (
>               p : in No_Argument_Procedure_Pointer );
> 
>           procedure Call (
>               p : in One_Integer_Argument_Procedure_Pointer;
>               i : in Integer );
>                    :
>     end Mapper
> 
> The implementation of each "Call" procedure would simply be a case
> statement to the appropriate "real" procedure call.

There were a bunch of examples better than the ones I provided given
during the lengthy discussion about procedure parameters over the
past few weeks which point out the insufficiency of this (not to
mention its inherent ugliness and limits).  Also shown were mechanism
for making the checking of procedure parameters quite possible (for
example by requiring that procedures used in that manner be strongly 
typed).

> 
> If anyone could provide an example where a Procedure_Pointer could
> not be used wherever one would like to use a "real" pointer to a
> procedure in a different langauge, I'd be grateful for a reply.
> 
> Again, I apologize if I'm just being dense, but...
> 

OK, apology accepted.  


-- 
Russell Holden
Computer Corporation of America
Four Cambridge Center
Cambridge, MA 02142

  reply	other threads:[~1986-06-22  3:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-05-28 15:54 ForTran-Ada + flamette + question richw
1986-05-30 12:46 ` Russ Holden
1986-06-20 15:36   ` ForTran-Ada + flamette + questi richw
1986-06-22  3:00     ` Russ Holden [this message]
1986-06-22  7:49     ` Enumerated "procedural" parameters Alastair Milne
1986-07-03  7:03       ` Dick Dunn
1986-07-10 22:26     ` ForTran-Ada + flamette + questi friesen
1986-07-11 15:38       ` ForTran-Ada ... (really function pointers) markb
1986-07-14 17:01   ` ForTran-Ada + flamette + questi richw
1986-07-18 21:59     ` vilot
1986-07-22 12:59   ` stt
1986-08-07 13:26     ` Christopher Reedy
  -- strict thread matches above, loose matches on Subject: below --
1986-06-03 19:11 gore
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox