chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Functions with lots of parameters


From: felix winkelmann
Subject: Re: [Chicken-users] Functions with lots of parameters
Date: Mon, 23 Oct 2006 09:30:41 +0200

On 9/29/06, Alejandro Forero Cuervo <address@hidden> wrote:
In this email I discuss some problem I've been thinking about lately.
It has to do with how to write complex functions that receive lots of
parameters; I believe the conclusions on this discussion could have a
great impact on how maintainable and easy to call complex functions
are.  Hopefully others will share their thoughts and we will be able
to learn from each other's experiences.


IMHO the only approach that covers your needs is a data structure
holding the parameters ("parameters" in the general sense, not
as in "parameterize"). The environment itself is basically nothing else,
but you can't really access it as a first-class object in useful ways,
so I'd suggest rolling your own. Note that for referential transparency
the parameter-objects have to be copied anyway.

Dynamic scope (using parameters or fluid bindings) will definitely
not work, due to lazy evaluation.

It might even be possible to hide the syntactic verbosity by using
the codewalk egg and re-writing variable references and bindings
(I haven't thought this out completely, though).


cheers,
felix

--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]