comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: Looking for Ada Technique Name and References
Date: 2000/02/29
Date: 2000-02-29T00:00:00+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0002290914250.6230-100000@shell5.ba.best.com> (raw)
In-Reply-To: 38BBF58A.ED345864@earthlink.net

On Tue, 29 Feb 2000, Charles Hixson wrote:
> Sorry, my point was that there was a "hierarchy" of languages.  I was
> ranking them (approximately) by decreasing amount of support for
> functional constructs. (Not clear, I realize, as I only gave three
> examples, and C [or C++] really is about on a par with Ada.)  But there
> are several different languages that give different degrees of support.
> Even the various dialects of Lisp range from the purely functional (i.e.,
> where all constructs can be phrased as a functional call with sugar around
> it) to Common Lisp.  And none of these are what I now think of as the
> functional languages:  ML, OCaML, etc.

Well, the topic has really changed, but if you are going to rank languages 
based on their support for the functional programming paradigm, I'd give 
Ada a fairly significant edge over C and C++ since 

(1) Ada is lexically scoped
(2) Ada allows the use of nested subprograms as subprogram parameters to 
    generic instantiations, allowing the crude simulation of downward 
    funargs. 

In my experience, this captures some small amount of FP style directly
which is awful in C and unpleasant in C++ (where you can overload "()" 
and explicitly pass local state rather than directly referencing variables 
from an enclosing scope). I hope that the issue of downward funargs is 
revisited in Ada 0X, since using generics this way is awkward when you've 
grown accustomed to direct support for this. Robert Eachus mentioned that 
if you have "apply" you never need iterators. I think that's a bit extreme 
(and he really meant "fold" ;-) but I also think downward funargs would
make that programming style far nicer in Ada.

I don't want to start a FP language war in c.l.ada, but why do you
consider "Pure Lisp", ML and OCaml functional, Common Lisp not? I use 
references, arrays, and exceptions in my OCaml code...

-- Brian





  reply	other threads:[~2000-02-29  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <88kegp$iso$1@coward.ks.cc.utah.edu>
     [not found] ` <88kh6q$j4j$1@coward.ks.cc.utah.edu>
2000-02-18  0:00   ` Looking for Ada Technique Name and References Tucker Taft
2000-02-21  0:00   ` Diana Webster
2000-02-22  0:00     ` John Halleck
2000-02-22  0:00       ` tmoran
2000-02-22  0:00         ` David Starner
2000-02-23  0:00           ` tmoran
2000-02-22  0:00       ` Vladimir Olensky
2000-02-22  0:00         ` John Halleck
2000-02-23  0:00       ` Nick Roberts
2000-02-22  0:00         ` Jon S Anthony
2000-02-28  0:00           ` Charles D. Hixson
2000-02-28  0:00             ` Jon S Anthony
2000-02-29  0:00               ` Charles Hixson
2000-02-29  0:00                 ` Brian Rogoff [this message]
2000-02-29  0:00                   ` Jon S Anthony
2000-02-29  0:00                     ` Brian Rogoff
2000-02-29  0:00                       ` Jon S Anthony
2000-03-01  0:00                         ` Brian Rogoff
2000-03-01  0:00                           ` Jon S Anthony
2000-03-01  0:00                         ` Charles Hixson
2000-03-04  0:00                     ` Nick Roberts
2000-02-29  0:00                   ` Wes Groleau
2000-02-29  0:00                     ` Gautier
2000-03-01  0:00                       ` Wes Groleau
2000-02-22  0:00   ` Gautier
replies disabled

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