chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] extracting srfi-1 from chicken 5


From: Evan Hanson
Subject: Re: [Chicken-hackers] extracting srfi-1 from chicken 5
Date: Sun, 15 Feb 2015 15:58:46 +1300

On 2015-02-01 21:56, Felix Winkelmann wrote:
> I pushed a branch ("drop-srfi-1") for extracting srfi-1 from
> chicken-core. I thought it might be easier to handle than a patch
> because I'm not sure if everybody agrees on the way it's been
> implemented, and some things may change.

Fantastic! I'm very much for this change.

> - There is an include file ("mini-srfi-1.scm") that holds the
>   procedures that are currently needed. It is included by several
>   units, mostly compiler units.

Rather than including the file, would it be better to construct
mini-srfi-1 as another chicken.compiler library unit and link it with
the appropriate objects? Then it would match the way the other
components are put together, mean fewer ways of doing things, etc. I
guess this would have performance implications as the compiler wouldn't
be able to optimize the procedures as aggressively, but it feels more
"proper" to me at first glance.

Then again, `include` is dead simple...

> - I had to drop the special cases in the scrutinizer for some of the
>   srfi-1 procedures.

No worries. (Incidentally, trying to see if we can get the same
functionality via type declarations may provide a nice set of use cases
for scrutinizer extensions.)

> - The selection of list-processing routines is not overly consistent
>   or creative, I just added simple definitions, with no
>   error-checking, but they should be quite efficient.

There are a couple of places where the mini-srfi-1 procedures are
slightly different than the originals. It looks like these are mostly
for simplicity's sake, and I don't really care, but thought it was worth
noting. If the other hackers feel strongly, we could asterisk them or
name them indicatively (e.g. `any1`).

> - Compilation in debug mode prints a lot of warnings, indicating 
>   the unused routines in the included mini-srfi-1.scm. Most of the
>   unused procedures will be removed by the compiler.

Can we just add `(unused ...)` declarations for the lot?

That's all from me. Once again, totally in favor, and happy to implement
any of the above suggestions if they sound sane.

Cheers,

Evan



reply via email to

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