[e-lang] Returning guards from __getAllegedType: opinions needed

Kevin Reid kpreid at mac.com
Tue Oct 17 08:43:21 CDT 2006


On Oct 16, 2006, at 11:36, Mark S. Miller wrote:
> Kevin Reid wrote:
>> 1. When __getAllegedType is invoked, evaluate all the guard
>> expressions except for those which depend on the results of pattern
>> matches.
>> [...]
>> 3a. As #1, but evaluate only expressions which are proven to have no
>> side effects.
>> [...]
>> This would be promoting DeepFrozen to Kernel-E evaluator behavior
>> (but then, so would the planned 'all guards are DeepFrozen' rule).
>> [...]
>> 3b. Same as #3a, but evaluate the expressions when the ObjectExpr is
>> evaluated. This would avoid repeated work by __getAllegedType and
>> make its output constant, but slow down object creation (outside of
>> the Sufficiently Smart Compiler).
>
> Is there any observable difference between #3a and #3b? If not,  
> then, as far
> as the spec is concerned, this is one option. The remaining  
> differences are
> choices for the implementor.

There is a difference: a given reference may not /yet/ be DeepFrozen,  
due to being or containing an unresolved promise.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list