Email list hosting service & mailing list manager

Alternative formulations of keywords John Cowan (11 Apr 2006 22:35 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 01:58 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 02:54 UTC)
Re: Alternative formulations of keywords Per Bothner (12 Apr 2006 03:05 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 03:12 UTC)
Re: Alternative formulations of keywords Eli Barzilay (12 Apr 2006 03:17 UTC)
Re: Alternative formulations of keywords Eli Barzilay (12 Apr 2006 03:20 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 03:27 UTC)
Re: Alternative formulations of keywords Per Bothner (12 Apr 2006 03:20 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 04:20 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 04:32 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 05:11 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 12:16 UTC)
Re: Alternative formulations of keywords Eli Barzilay (12 Apr 2006 12:29 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 13:07 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 13:36 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 14:25 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 14:28 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 14:57 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 16:26 UTC)
Re: Alternative formulations of keywords Per Bothner (12 Apr 2006 16:49 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 16:56 UTC)
Re: Alternative formulations of keywords Eli Barzilay (12 Apr 2006 13:37 UTC)
Re: Alternative formulations of keywords Marc Feeley (12 Apr 2006 04:54 UTC)
Re: Alternative formulations of keywords John Cowan (12 Apr 2006 16:07 UTC)

Re: Alternative formulations of keywords John Cowan 12 Apr 2006 04:32 UTC

Marc Feeley scripsit:

> How is foo going to determine which parameters were supplied?  Are
> you assuming that the compiler has some knowledge about foo so that
> it knows the complete set of named optional parameters and can pass
> the "unsupplied value" for the parameters that are not supplied?

Just so.

> In general this is impossible because the function to call may be
> computed, as in:

I agree that my proposal #1 will not work when the function to be
called is not known at compile time.  However, I don't mind if it
doesn't work in every case, since the equivalent form for which the
keywords are a shorthand is always well-defined, if awkward.

If you are familiar with Prolog, I'm suggesting something vaguely
analogous to the use of DCG clauses.

> For the second proposal you have to assume the general case where you
> are passing computed expressions, such as:
>
>    (foo 'bar foo: (f x) bar: (g x))
>
> which would have to be transformed into
>
>    (foo 'bar (list (cons 'foo: (f x)) (cons 'bar: (g x))))

Or equivalently to (foo 'bar `((foo: . ,(f x)) (bar: . ,(g x)))).

--
We pledge allegiance to the penguin             John Cowan
and to the intellectual property regime         xxxxxx@ccil.org
for which he stands, one world under            http://www.ccil.org/~cowan
Linux, with free music and open source
software for all.               --Julian Dibbell on Brazil, edited