[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] http cookie order
From: |
Graham Fawcett |
Subject: |
Re: [Chicken-users] http cookie order |
Date: |
Mon, 31 Mar 2008 13:59:16 -0400 |
On Mon, Mar 31, 2008 at 1:40 PM, Tony Sidaway <address@hidden> wrote:
> Thanks for a very informative analysis.
>
> Of course this whole problem only cropped up because we Schemers like
> to build up lists by consing new elements to the front. I would
> probably have included a "reverse" in the result of the let loop
> without thinking,
I think I'm wired the same way. Typing (if (null? lst) (reverse acc)
...) is the path of least resistance!
> but unless you have reason to suspect that attribute
> order will matter somewhere down the line, that's just wasted CPU
> cycles and wasted consing.
I don't think I'd worry much about the consing: there are rarely many
attributes in a request, and minor GC would deal with the garbage
quickly and efficiently. It's worth the cost in order to make the
attribute-list "more correct", and Drake has dug up proof that
ordering is significant in the spec.
> Of course, then somebody comes along and
> writes a hack to update the cookie attribute.. :)
Let's hope they do it with (set-cdr!) and all is well!
Graham