comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!darwi
Subject: Re: Passing procedures as parameters to procedures.
Date: 6 May 93 09:39:20 GMT	[thread overview]
Message-ID: <1samc8$kjd@huon.itd.adelaide.edu.au> (raw)

>From article <dewar.736623350@schonberg>, by dewar@schonberg.NYU.EDU (Robert D
ewar):
> I actually think that in languages at the level of Ada/C etc, the notion of
> pointer to procedure is clearer than the idea of a procedure as a value.
> 
> An interesting note here is that one Algol-68 text book contained in its
> helpful advice the suggestion that it was better to pass procedures by
> reference rather than by value, because it would avoid inefficient copying
> of the code of the procedure. This may be an extreme case, but it is a nice
> indication of the confusion that can be caused by considering procedures as
> values in this level of language.
> 

Fair enough, Robert. I can also think of cases where there could be a
mighty confusion between a function and the value it returns (if this
is a procedural value). 

Still, my feeling is that, in the drive to avoid a profusion of new
reserved words, many, including possible "acess" and "all", have
become very overloaded. I know overloading is in the spirit of Ada :-)
but this is a bit unfortunate.

Syntax, however, is really a minor consideration. The important thing
is expressive power. Procedural objects extend that power very
markedly, but I think my example showed an area where it was missing
in Ada83 and (as Tucker Taft showed in correctly ruling out my
proposed 9X solution to my problem) will be missing in Ada9X. It would
be a pity to be able to say that there is STILL an area where Pascal
has more expressive power than Ada!

(On the subject of the problem I posed, I have changed my mind! It is
not insoluble - in fact I have solved it. Magnus Kempe's "solution",
while not correct, was close enough that, unless I see a correct
solution posted either in this news group or by email to me, I will
send him a (small) bottle of Australian red. Then he can test out
Thomas Jefferson's saying!

However, I have dreamed up a generalised form of this problem that I
still think is insoluble.)

cheers


andrew



#  Andrew Dunstan                   #   There's nothing good or bad   #
#  net:                             #                                 #
#    adunstan@steptoe.adl.csa.oz.au #   but thinking makes it so.     #
#  or: andrewd@cs.adelaide.edu.au   #                                 #

             reply	other threads:[~1993-05-06  9:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-06  9:39 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!darwi [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-10 22:56 Passing procedures as parameters to procedures Jack Dean
1993-05-06  7:33 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!torn!
1993-05-05 21:35 cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!progers
1993-05-05 17:39 Robert Dewar
1993-05-05 17:35 Robert Dewar
1993-05-05 16:30 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!us
1993-05-05 11:40 cis.ohio-state.edu!news.sei.cmu.edu!firth
1993-05-05  9:50 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!howland.
1993-05-04 23:44 cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!ho
1993-05-04 22:13 John Goodsen
1993-05-04 19:39 cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!m
1993-05-04 16:41 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!ira.u
1993-05-04 16:25 Mark A Biggar
1993-05-04 15:43 Tucker Taft
1993-05-04 14:29 cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!spool.mu.edu!
1993-05-04 13:59 Tucker Taft
1993-05-04 13:45 cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!howland.
1993-05-04 13:45 cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!cs.utexas.edu
1993-05-04 10:25 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!us
1993-05-03 20:36 Mark A Biggar
1993-05-03 19:07 cis.ohio-state.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!ho
replies disabled

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