[e-lang] Auditors
Kevin Reid
kpreid at mac.com
Mon Jun 4 09:17:53 EDT 2007
On Jun 4, 2007, at 8:35, Stephan van Staden wrote:
> Kevin Reid wrote:
>> Having __approvedBy return a promise in the first case would still be
>> a mutation (the promise resolving), which would require either foo or
>> __approvedBy to be not considered DeepFrozen;
> Yes, I would regard __approvedBy not as DeepFrozen and part of the
> auditing system.
This is impractical, as it would prevent, e.g., a guard (or anything
else) implemented in terms of audit checking from being DeepFrozen.
>> it is also impossible
>> to know immediately the set of auditors for which promises rather
>> than false should be returned, since an auditor can ask/1 for other
>> auditors to be applied to the object being audited.
>>
> I guess this problem would vanish If all auditors returned promises.
By itself, this would have no effect (other than making synchronous
use of auiting impossible). However, if one additionally defined that
__approvedBy returns only promises until the entire set of auditors
has responded, then we would gain the guarantee that once __approvedBy
(DeepFrozen, x) has resolved, the responses of __approvedBy are all
near booleans; therefore, __approvedBy may correctly be DeepFrozen.
But this is impractical, as it creates the restriction that any
object which needs to be audited must be created in a turn before it
is used.
For example, consider a parameterized guard:
def List implements DeepFrozen {
to audit(specimen, ejector) { ... }
to get(elementGuard) {
def TypedList implements DeepFrozen {
to audit(specimen, ejector) { ... }
}
return TypedList
}
}
def x :List[int] := [1,2,3] would then necessarily fail, because List
[int] will not become DeepFrozen within this turn.
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list