[e-lang] Rename Guard, ValueGuard (was Re: Conflict of principles)

Kevin Reid kpreid at attglobal.net
Thu Sep 1 18:31:52 EDT 2005


Mark Miller <markm at cs.jhu.edu> wrote:

> Kevin Reid wrote:
> > If desirable, GuardPattern could expand to it:
> > 
> >   left :int
> > =>
> >   left ? Guard.coerce(int)
> 
> Also, shouldn't the expansion be to the following pattern?
> 
>     left ? ValueGuard.coerce(int, null)

Yes.

> ...
> Kernel-E should only care that guards obey the ValueGuard protocol
> (coerce/2 and expectation that they override __printOn/2) rather than
> being full Guards. The remaining operations defined in Guard are only for
> programmer convenience, not for use by Kernel-E.

Yes.

Also, the names Guard and ValueGuard are leftovers from the SlotGuard
days. I propose renaming ValueGuard to Guard and Guard to -- something
else.

I haven't thought of a decent name for Guard, though; just
ExtendedGuard, SugaredGuard, FancyGuard, etc., which might be true but
don't really say anything.

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


More information about the e-lang mailing list