chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] testcase -strict-types


From: Felix
Subject: Re: [Chicken-hackers] testcase -strict-types
Date: Sat, 30 Mar 2013 23:33:37 +0100 (CET)

> Though in a way the explanation is correct.  -strict-types assumes
> '() to be null from the initialization.  Short of a way to declare
> the type of foobar as (list-of <whatever>) this fails when it's used
> as the initial and correct value of type (list-of <whatever>) with
> zero length.
> 
> What the optimizer should do is to see into the doloop and notice
> the ambiguous type null being refined to a list.

... and this is exactly what the normal type-analysis is doing.  But
that refinement generalizes the type of a variable to cover all uses
of it, and that makes it very difficult to figure out the most
specific type, in particular when the type changes during the lifetime
of a variable. List-types create more problems as this example
shows. So I can only keep suggesting not to use strict-types but in
special situations.


cheers,
felix



reply via email to

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