chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Runtime arity?


From: Kon Lovett
Subject: Re: [Chicken-users] Runtime arity?
Date: Thu, 31 Jan 2008 07:50:36 -0800


On Jan 31, 2008, at 5:48 AM, felix winkelmann wrote:

On Jan 29, 2008 6:25 PM, Kon Lovett <address@hidden> wrote:

Yeah, it seems we need a database of the built-in's "procedure-
information". Oh well, one more todo.


Is it really necessary to allow accessing the lambda-lists of primitives?
The lambda info object is a string - parsing it all the time to figure
out calling conventions is ugly at best and incomplete as well, since
optional and keyword arguments are not visible (only that optional
or rest arguments are at all available). Lambda-info is just a debugging aid, not a reflection mechanism. In the interest of keeping code and heap
sizes small I recommend not extending this stuff.

Forgot that lambda-info is a string.

Having accurate arity would be nice for more sophisticated parameter checking. When taking procedure params verifying the correct param count is an extra level of warm-fuzzy. It keeps the error detection local, rather than somewhen & somewhere else in the computation, far removed from the error site.

I would leave accurate "lambda info" as a TRAC ticket. As you state, even for user lambdas, the DSSSL info isn't saved.

Leaves open the possibility of a "lambda creation hook" that can be used by some extension to do all sorts of wonderful things.



cheers,
felix

Best Wishes,
Kon






reply via email to

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