chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] sequence type corrections and enhancements


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] sequence type corrections and enhancements
Date: Tue, 13 Sep 2011 22:25:25 +0200
User-agent: Mutt/1.4.2.3i

On Sun, Sep 11, 2011 at 12:26:45AM +0200, Felix wrote:
> The attached patch implements a correction of the available sequence
> type specifiers.

This is quite a big patch, but I can see that the changes to types.db
and the tests are mostly about mechanical changes.

I don't quite grok the scrutinizer code yet, but from what I understand
the patch is good.

> Currently "(list T)" and "(vector T)" designate lists
> or vectors with an unknown number of elements of the given type. This
> is suboptimal, because fixed-length lists/vectors (with possibly
> different element types) can not be handled by the flow analysis.
> 
> So "(list T)" and "(vector T)" have been renamed to "(list-of T)" and
> "(vector-of T)" (which is compatible to the type-syntax of some other
> obscure Scheme implementation). "(list T ...)"/"(vector T ...)" now
> specify lists/vectors of fixed length with elements of the given
> types.

I think you overlooked these entries:

- reverse: argument and result
- member, assv, assoc: specialization types

Also, member has a (forall a) in its declaration but doesn't use it,
which looks wrong to me.

Further, "set-groups!" from POSIX is declared to accept a generic list.
This could probably be improved to (list-of (or fixnum number)), I think.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

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