[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dylan implementation question



housel@acm.org (Peter S. Housel) wrote in message news:<mu9wuws6ntq.wl@ip68-4-88-233.oc.oc.cox.net>...

> The usual answer is to do this:
> 
> define inline sealed method element
>     (ht :: <table>, key :: <object>, #key default: default = $not-supplied)
>  => (result :: <object>);
>   // ...
> end method element;
> 
> The $not-supplied token is an internal constant that users can't 
> normally pass around, since its name is not exported.  :
> 
> define class <not-supplied-marker> (<object>)
> end;
> 
> define constant $not-supplied :: <not-supplied-marker>
>     = make(<not-supplied-marker>);
 
Thanks to all for the hint--it makes sense now. I guess the only
additional complication is that the presence of specializers attached
to keyword parameters might require the use of several different
"not-supplied" constants of different types.

-Steve Schafer