[e-lang] Returning guards from __getAllegedType: opinions needed
Mark S. Miller
markm at cs.jhu.edu
Mon Oct 16 10:36:29 CDT 2006
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.
If this is true, then, I propose that align this decision to the decision
about whether Kernel-E insists that all guards are DeepFrozen. I propose that
Kernel-E 0.9 does not require that guards be DeepFrozen, and therefore also
makes decision #1. However, we also reserve the right to decide that Kernel-E
1.0 does require guards to be DeepFrozen, and therefore also makes decision
#3. Therefore, we recommend that code written to E 0.9 not depend on guards
not being DeepFrozen, and not depend on #1 rather than #3.
--
Text by me above is hereby placed in the public domain
Cheers,
--MarkM
More information about the e-lang
mailing list