chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] CR: (#439) quasiquote changes


From: Alaric Snell-Pym
Subject: Re: [Chicken-hackers] CR: (#439) quasiquote changes
Date: Sat, 11 Dec 2010 13:22:15 +0000
User-agent: Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.1.9) Gecko/20100520 Lightning/1.0b2pre Shredder/3.0.4

On 12/10/10 22:09, John Cowan wrote:
> Thomas Chust scripsit:
>
>> few Scheme compilers would report (cons (x)) as a compile time error
>> for lack of static type information.
>
> You don't need any, unless you are prepared to handle reassigning (as
> opposed to rebinding) the name.  As long as cons is not locally rebound,
> you know it takes two arguments, and if it is locally rebound, you still
> know how many arguments it takes if it is bound to a lambda, and can
> blow it off if it is not.  If that counts as static type information,
> it's a pretty minimal variety.

I would also be concerned about how to efficiently implement this...

If (foo (a) (b) (c)) is to be compiled without values-splicing, it's
easy enough to arrange for the return value of (a) to end up wherever
the first argument of (foo ...) should go, and so on.

With value-splicing, unless we can tell in advance (through difficult
analysis) how many values each of (a), (b) and (c) return, we'd need to
collect them together at run time and then put them into the activation
record for (foo ...).

ABS

--
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/



reply via email to

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