Re: How come Ada isn't more popular?

Robert A Duff <bobduff@xxxxxxxxxxxxxxxxxxxx> writes:

Markus E Leypold
<development-2006-8ecbb5cc8aREMOVETHIS@xxxxxxxxxxxxxxxxxxxxx> writes:

If yout have only downward scopes for "closures" and memory allocation
this will, finally, interact badly with the fact that "implicit
(i.e. static type safe) casting" of classes is also only possible
downwards. My impression is, that all these things together rule out
some useful designs, that would otherwise possible. Or to say it
differenty: Object orientation w/o indeterminable scopes, upward
closures and GC doesn't work well. Some abstractions cannot be

Why do we call these closures "downward" and "upward" instead of the
other way around?

I don't know. It's a pathological condition anyway :-). I'm using this
vocabulary as I find it.

A downward closure (allowed in Ada 2005, and to some
extent in Ada 83) is a procedure that is passed IN to another procedure,
which is toward the TOP of the call stack (up!).

It's passed downward th call chain.

An upward closure (not
directly supported in Ada, but supported in Lisp et al) is a procedure
that is passed OUT (return value, 'out' parameter, setting a global
variable) -- which means it's being passed DOWN toward the BOTTOM of the
call stack.

(Of course, the call stack is not quite a stack anymore, if
upward closures are allowed!)

Depends. Just yesterday I've been imagining a system which basically
uses a stack, but when passing a "closure" upwards, copies parts of
the stack to the heap.

Chicken scheme I think, also uses a stack (in som unusal ways), but
still has closure.

It seems to me "inward" and "outward" closures would be clearer
terminology, for what are normally called "downward" and "upward",

What you call outward closures are just closure. There was a
discussion at comp.lang.functional which convinced me, that closure
should better be called procdures (because it's rathe the natural way
how things should work) and what is presently called downwards closure
should better be called somthing different, like, say stack bound
procedures (to indicate that their lifetime depends on the stack).

But it's certainly too late now to change established if misleading

Regards -- Markus