This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Jim Blandy writes: > > > There's no easy way to do it with stock guile, however, there is an > > optinal arguments package that comes with scwm (available on the guile > > contrib site, among other places) which provides a `lambda*' macro > > that handles optional and keyword arguments. > > I hope, eventually, that Guile will have some kind of built-in support > for optional and keyword arguments. I can't say what the syntax of > the declarations will be. However, it's unlikely that the syntax of > calls will change much, and we can always implement something like > lambda* as a macro on top of whatever primitives we choose, so I'd > say, go ahead and use lambda* for now. > Are optional/keyword arguments stuff like in BOS constructors (make-object <animal> 'name "gnu" 'alias (list "wildebeest") 'weight 500 'height 52 'food "grass" 'horns #t 'home "africa" 'tail "cute" 'favorite-song "The lion sleeps tonight") which constructs an object of the class <animal> , setting some property slots (like name, height, weight etc.) to an indicated value, whereas those who are missing are set to default values, for example wings => #f , eggs => #f ...? How would one do stuff like that properly in C wrapper code? Is lambda* meant to be completely analogous to let* ? Klaus Schilling