[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Facilities on top of SRFI 37: args-fold
From: |
Zbigniew |
Subject: |
[Chicken-users] Facilities on top of SRFI 37: args-fold |
Date: |
Mon, 6 Jun 2005 00:04:44 -0500 |
args-fold is a neat design, but it can be somewhat complicated (and
tedious) to use. I figure most people will write support code to make
it easier. Unfortunately I could not find any, so at the risk of
reinventing the wheel I wrote my own.
The main goals were: 1. Collate options and operands into two lists
(seeds), and return these; 2. Make the user not have to manage these
seeds in the code for each option. Options can still execute code as
they do in SRFI 37, it is just transparently wrapped (#2) in seed
management code (#1). Hooks are provided to handle operands and
unrecognized options, but reasonable defaults are provided. (For
unrecognized options, the default prints a warning and invokes the
help option.)
I would expect this design to evolve as I use it more. There are
things I am not that happy with. So suggest away.
Would it make sense to make this or a derivative into an egg? Is
there another, better implementation somewhere?
http://gnook.org/~zbigniew/args/args.scm
http://gnook.org/~zbigniew/args/args-examples.scm
Zb
- [Chicken-users] Facilities on top of SRFI 37: args-fold,
Zbigniew <=