Substructural properties and laziness

12 views
Skip to first unread message

Matthew Blount

unread,
Jul 31, 2015, 12:43:48 PM7/31/15
to reactive-demand
Hi,

I was thinking about the interaction of the affine/relevant properties and lazy evaluation. Compound data structures are affine/relevant if any of their components are affine/relevant, but doesn't this mean that the entire data structure needs to be evaluated in order to determine if the whole thing can be copied/dropped? At first I thought some form of abstract interpretation could be used to determine this, but I don't think it can give a precise answer for dependently typed functions.

David Barbour

unread,
Jul 31, 2015, 3:43:17 PM7/31/15
to reactiv...@googlegroups.com
Affine and relevant properties could generally be validated statically. A compiler could reject laziness in cases where it cannot perform this validation. I don't think this would be a significant issue.

Though, I disfavor laziness for Awelon for other reasons. I'm more interested in alternatives such as annotations for memoization and interning of values.

Reply all
Reply to author
Forward
0 new messages