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

Re: Alternative formulations of keywords



Marc Feeley scripsit:

> Most Scheme systems allow separate compilation (think of "load").  [...]  
> You have the same problem.  So it doesn't suffice for the function  
> definition to be global.

I think this argument is strong enough that I will drop #1 (without
prejudice, as the lawyers say: meaning that if someone comes up with
a good counterargument I may revive #1).

There remains #2, which converts keyword-argument pairs to a-lists.
This requires only that it be lexically apparent what is and what is not
a keyword, not that the actual set of keywords for a function be known.
(Still awaiting a use case for (foo bar baz zam) where baz evaluates
to a keyword at runtime.)

I will also formally add #3 now, in which the keywords are syntactic
sugar for procedure *names* like foo:bar:baz:zam:.

In both cases higher-order invocations are possible, though not with
keyword syntax.  #2 requires more work at run-time but avoids possible
combinatorial explosions.  #3 requires nothing at run-time but may create
an explosion of code space.

> The way I see it you are forbidding the use of higher-order functions  
> in combination with named optional parameters.  That would be a  
> serious limitation for a functional language like Scheme.

It would, and I certainly don't want that.

-- 
My confusion is rapidly waxing          John Cowan
For XML Schema's too taxing:            cowan@ccil.org
    I'd use DTDs                        http://www.ccil.org/~cowan
    If they had local trees --
I think I best switch to RELAX NG.