Mixing strict & lazy 
Author Message
 Mixing strict & lazy


Quote:
>    Most parts of most programs do not require lazy evaluation,
>    but when you do need it, it's much easier if it is a natural
>    part of the language. ...  The ideal approach is to have
>    lazy evaluation semantics, but to perform strictness analysis
>    to optimize to eager evaluation where the two are equivalent,
>    since call-by-value will in general be more efficient.

Except that strictness analysis is very difficult to do,
especially when dealing with streams, where the issue
is not just _whether_ to compute, but _how much_ to compute.


Quote:
>    IMHO, we need languages where both 'lazy' (aka 'normal order')
>    and 'eager' (aka 'applicative order') evaluation are primitive
>    to give the programmer ability to specify which is to be used
>    in a situation ...  Why not allow lazy and eager evaluation
>    to co-exist?

I agree.  I am interested in the possibility of providing
both strict and lazy primitives as a declarative way
for the user to influence the computation order.
One goal of the research would be to clarify
how these primitives would interact with each other.

A reviewer of my last grant proposal commented that I
seemed to be "painfully rediscovering strictness analysis."
But comparing my ideas with the treatment of strictness analysis
in Peyton Jones, there seems to be at most some similarity
with the program _annotations_ used to record the _results_
of strictness analysis.  A key difference is that my strict primitives
would be part of the language proper, whereas strictness analysis
annotations are metalogical.  I would permit use of strict primitives
even where they alter the program's semantics (as compared
with use of the lazy analogs).

Has any other work been done along the lines we have been considering?
A student and I are now writing up some some preliminary results,
and we'd like to be able to compare it to any similar work,
as well as to give proper credit.

------------------------------------------

Tulane University       New Orleans, Louisiana  USA



Sat, 07 Jan 1995 00:56:41 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Lazy and Strict Functional languages

2. Lazy vs. Strict

3. \not \exists {middle ground between lazy and strict}

4. ~ and Lazy vs. Strict Pattern Matching

5. Problem with && lazy evaluation

6. Strict Windows look&feel on cygwin tcl/tk

7. lazy.py 0.7 - Lazy expressions and datastructures

8. How lazy is lazy?

9. lazy (non-eager) Scheme ??? (lazy, but eager me)

10. lazy.dylan 0.1 -- add ML/Scheme-style lazy evaluation to Dylan

11. lazy.py 0.7 - Lazy expressions and datastructures

12. lazy (non-eager) Scheme ??? (lazy, but eager me)

 

 
Powered by phpBB® Forum Software