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] |
Maciej Stachowiak <mstachow@mit.edu> writes: > You can either use #:keyword as the syntax (this is the default print > and read syntax) or you can use a reader option to also recognize the > :keyword syntax, but I forget what it is (I thought is was > (read-enable 'keywords) but that doesn't work for me). I was just doing a short project so I settled for just passing an alist in. It's non-optimal but it gets the job done. BTW, it's done, a little set of funcs to make generating makefile rules and variables easier. > scheme/optargs.scm in the scwm distribution. An improved version of > this will likely make its way into Guile as soon as I can get papers > signed by my company (I hate lawyers); it provides lambda*, define*, > define*-public etc which take lambda-lists rather similar to Common > Lisp. Extensive docs are in the file. If you are planning to use > keywords for purposes other than keyword arguments, I reccomend > against; quoted symbols are generally better for such pruposes. Thanx for the tip on the optargs thing. I often find the scheme calling mechanisms a bit underpowered for when your trying to use procedures for defining data types, or for providing a protocol with somewhat complex semantics. Which brings me to another guilism. The record types look like they could be the basis of something similar to CL structures. Has anyone written the macros to make them behave similarly, automatically declaring the getters and setters for the records fields, same with constructors? -- Craig Brozefsky craig@onshore.com onShore Inc. http://www.onshore.com/~craig Programmer loitering on the edge