MarkM sez:
>What do you get when you cross Chip's "^" syntax with Bill & Norm's memories
>of Algol68? A more expressive way to say whether a value is returned.
>
>To start with the punch line, here's the old getterSetterPair() example
>http://www.erights.org/elib/capability/ode/ode-objects.html#facets rewritten
>using the syntax I'm proposing:
>
> define getterSetterPair(value) ^any {
> define getter() ^any { value }
> define setter(newValue) ^void { value := newValue }
> [getter, setter]
> }
>1) Guarding a return value
>
>The guard is known as a ValueGuard. A ValueGuard is sent the message
>"coerce(specimen)" and it either return a coercing of the specimen it finds
>acceptable, or it throws an exception. Were "any" just a ValueGuard, its
>definition would be
Since it's purpose is to control what rights get out, I suppose you could call it a RightGuard. It helps ensure that your security doesn't stink.
>2) Guarding a variable definition.
>
>The guard is known as a SlotGuard. A SlotGuard is sent the message
>"makeSlot(specimen)", and it is expected to return a Slot whose initial value
>is that specimen, or a coercion of that specimen.
And in keeping with my previous comment, this one would be a WriteGuard.
>...long discussion of guards and their implications...
Aside from my criticism of the syntax (above), I really like this mechanism as a hook for the beginnings of a run-time type system. This is one of those things, however, whose presentation we should be *very* careful about so as not to dump a giant bag of complexity on the neophyte E programmer (as well as not dumping a giant bag of complexity on the E system developers!).