comp.lang.ada
 help / color / mirror / Atom feed
From: Ehud Lamm <mslamm@mscc.huji.ac.il>
Subject: Re: Icon Co-Expressions in Ada
Date: 1998/12/17
Date: 1998-12-17T00:00:00+00:00	[thread overview]
Message-ID: <Pine.A41.3.96-heb-2.07.981217210745.15552D-100000@pluto.mscc.huji.ac.il> (raw)
In-Reply-To: 36794F71.762920E4@elca-matrix.ch

On Thu, 17 Dec 1998, Mats Weber wrote:

> Ehud Lamm wrote:
> 
> > For this to work from arbitrary procedures, the language provides the
> > suspend statement, which is like return but after which the procedure may
> > be resumed.(you can have a procedure say suspend 4; suspend 5; for
> > example).
> 
> This sounds like coroutines in other languages. The closest Ada has to
> offer is tasks, but as Ada tasks can be called concurrently, you will
> have a significant overhead over a simple coroutine mechanism.
> 
See my post about Co-Expressions and goal directed evaluation in general.
The concepts are near but not identical. You can have generators (that is,
routines that use suspend and return a series of values) without using
Co-Expressions.
I think Co-Expressions are what others call co-routines, but I am not 100%
sure.

About the overhead. Can we design something less costly using protected
objects?

Ehud Lamm     mslamm@mscc.huji.ac.il
http://www2.cybercities.com/e/ehud   E-List Home Page





  reply	other threads:[~1998-12-17  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-16  0:00 Icon Co-Expressions in Ada Ehud Lamm
1998-12-16  0:00 ` Stephen Leake
1998-12-16  0:00   ` Al Christians
1998-12-17  0:00   ` Mats Weber
1998-12-17  0:00     ` Ehud Lamm
1998-12-17  0:00   ` Ehud Lamm
1998-12-17  0:00     ` Stephen Leake
1998-12-17  0:00       ` Ehud Lamm
1998-12-17  0:00     ` Mats Weber
1998-12-17  0:00       ` Ehud Lamm [this message]
1998-12-17  0:00       ` Chris Morgan
1998-12-16  0:00 ` dennison
replies disabled

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