Note that Campbell's proposal only covers the functionality of DSSSL #!optional, not #!key [which Shawn liked I presume because of the out-of-order named parameters].
One might also consider using get-keyword on the rest-list (see section 5.7.6, Keywords). I used this method in args.egg for named parameters. This doesn't address some of Shawn's syntax objections, but in the end I find the definitions palatable and calls such as (fn 1 i: 2 j: 3) quite readable. On 9/26/05, felix winkelmann <[EMAIL PROTECTED]> wrote: > On 9/25/05, Shawn Rutledge <[EMAIL PROTECTED]> wrote: > > That's cool! They work out of order too! > > > > I was wanting to do something like that. One reason people like XML > > is that you can have optional attributes and give them in any order. > > So then they try to use XML as a programming language and it's just > > not well suited to that. > > > > The "even number of args" requirement is a little odd though. Another > > syntax for this kind of functionality would be > > > > (fn (i . 1) (j . 2)) > > > > which seems more like typical scheme to me, and you don't need the > > special meaning for symbols that end with colon. > > > > Another interesting idea is here: > > http://www.bloodandcoffee.net/campbell/proposals/optional.text > > > cheers, > felix > > > _______________________________________________ > Chicken-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/chicken-users > _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
