comp.lang.ada
 help / color / mirror / Atom feed
From: 4526P@NAVPGS.BITNET ("LT Scott A. Norton, USN")
Subject: Re: using <subprogram>'address for callback
Date: Wed, 16-Sep-87 14:55:00 EDT	[thread overview]
Date: Wed Sep 16 14:55:00 1987
Message-ID: <8709162054.AA24871@ucbvax.Berkeley.EDU> (raw)

( Please excuse me if I have a Pascal accent; I still can't write
Ada without the book open in my lap. )

The disscussion on X-windows, particularly callbacks, has
reawakend my interest in one of the design decisions from
Steelman.  The particular feature of Ada that caught my eye, when
I first was learning the language, was that a procedure could not
have a function or another procedure as a formal parameter.  I
don't think that "integrate( f, a, b )" is poor software
engineering, but you can't do that directly in Ada.  The Ada
solution I saw in one text for integrating a function involved
generics, but that seem kludgy to me.  So, I'm asking:

 1. Why does Ada not permit functions as formal parameters?

 2. Is there some other clean way to model functionals ( functions of
    functions ) besides instantionating a generic for each pair of
    functional and its argument function?

I realize that sometimes, a programming model that works well in
one context produces serious inconsistancies in another.  And so,
we don't see Algol-60 call by name anymore.

LT Scott A. Norton, USN
Naval Postgraduate School
Monterey, CA 93943-5018
4526P@NavPGS.BITNET

             reply	other threads:[~1987-09-16 18:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1987-09-16 18:55 "LT Scott A. Norton, USN" [this message]
  -- strict thread matches above, loose matches on Subject: below --
1987-09-17 19:30 using <subprogram>'address for callback Mike Feldman
1987-09-16 13:13 Emery
replies disabled

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