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

Re: #f = #none ?



> Date: Mon, 23 Nov 1992 14:31:10 -0500
> To: rwk@crl.dec.com
> Cc: info-dylan@cambridge.apple.com
> Cc: cfry@MIT.EDU, samp@kurz-ai.com
> In-Reply-To: Bob Kerns's message of Fri, 20 Nov 92 20:29:40 -0500 <9211210129.AA18179@taunton.crl.dec.com>
> Subject: #f = #none ? 
> From: Stavros Macrakis <macrakis@osf.org>
> Sender: macrakis@osf.org
> 
>        If our problem is getting to explcitly use a default value, how
>        about a function that, given the name of a function and the
>        name of one of its arguments, returns the value of the default
>        for that function.
> 
>    I like this, a lot.  Information should be explicit and
>    represented, not closed and hidden.
> 
> In effect, this makes keyword names part of the dynamic structure of
> the language, not just its static structure.  I don't like this,
> because it is using environment operations (or "meta-operations" if
> you prefer) as ordinary operations.  Environments need dynamic
> operations on argument lists; running code should not.

I have a hard time separating out the "environment" from the
"running code". Maybe that's just the kind of programs I write.
In any case, if one of the things your "running code" is not allowed to
do is redefine functions, then the "stand-alone-application compiler"
should be able to grab the default value of some referenced fn and
tuck it away so that it can be used to effectively replace the call
to the (get-default-value ...) fn
when it is "called" by the running code, and no one will be the wiser.
In this scheme you wouldn't be able to do stuff like:
(get-default-value (intern (concatenate 'string "foo-" "bar"))
                   (if *dead?* 'arg1 'arg2))
but would be forced to limit yourself to:
(get-default-value 'foo-bar 'arg1), or maybe make it a macro and
leave off the quotes altogether. I'd be happy with that
limitation for almost all my uses of such a capability.