comp.lang.ada
 help / color / mirror / Atom feed
From: Jon S Anthony <jsa@synquiry.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: <38BC73CC.54B8@synquiry.com> (raw)
In-Reply-To: Pine.BSF.4.21.0002291431530.6230-100000@shell5.ba.best.com

Brian Rogoff wrote:
> 
> > ??? Surely you don't mean to imply that C/C++ are dynamically scoped?
> 
> No, C is lexically scoped too, but in a very trivial way, since you can't
> nest subprogram definitions.

Right - this is leading where I figured you intended it to go.

> > I'm still not clear on why you think this means that C/C++ are not
> > lexically scoped (or perhaps "less lexically scoped" than Ada).
> > Certainly passing local state around does not impact this.  I agree
> > that there are cases where you _have_ to do this when a lexically
> > scoped access is what you really want.
> 
> Because in Ada I can declare a subprogram nested in another, which
> refers to local variables in the enclosing subprogram, and then use
...

Right, this is actually exactly what I thought you intended.  I agree
with this completely.

> So, while they are strictly speaking lexically scoped, it isn't very
> useful from a "coding FP" perspective. I hope that's clearer.

Also agree.

> > > 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...
> >
> > Good question; direct support for iteration?
> 
> Here's some legal OCaml from the manual
> 
> #let insertion_sort a =
>    for i = 1 to Array.length a - 1 do
>      let val_i = a.(i) in
>      let j = ref i in
>      while !j > 0 && val_i < a.(!j - 1) do
>        a.(!j) <- a.(!j - 1);
>        j := !j - 1
>      done;
>      a.(!j) <- val_i
>    done;;

So much for iteration being the reason (as I mentioned, this couldn't
have been quite right anyway as he seems to exclude Scheme as well).

> val insertion_sort : 'a array -> unit = <fun>
> 
> I guess OCaml isn't an FP then. Charles?

Well, he already claimed it was, so there must be some other
feature(s) of direct Lisp family members that excludes them in his
taxonomy.  I see OCaml also has assignment.

Charles, what about Dylan?


/Jon

-- 
Jon Anthony
Synquiry Technologies, Ltd. Belmont, MA 02478, 617.484.3383
"Nightmares - Ha!  The way my life's been going lately,
 Who'd notice?"  -- Londo Mollari




  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       ` Vladimir Olensky
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-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
2000-02-29  0:00                   ` Jon S Anthony
2000-02-29  0:00                     ` Brian Rogoff
2000-02-29  0:00                       ` Jon S Anthony [this message]
2000-03-01  0:00                         ` Charles Hixson
2000-03-01  0:00                         ` Brian Rogoff
2000-03-01  0:00                           ` Jon S Anthony
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