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: Sun, 31 Mar 2013 00:36:56 +0100 (CET)

From: Peter Bex <address@hidden>
Subject: Re: [Chicken-hackers] testcase -strict-types
Date: Sat, 30 Mar 2013 23:44:01 +0100

> On Sat, Mar 30, 2013 at 11:33:37PM +0100, Felix wrote:
>> 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.
> 
> Would you be so kind as to explain what exactly is the purported use
> of strict-types?  It's all rather unclear to me right now.

Strict-types means you declare that variables never change their type,
once a type has been inferred (or explicitly declared). There are a
few places in the scrutinizer where it can make stronger assumptions
about variable types during flow-analysis, which leads to potentially
much better code. In fact, the improvements where the reason that the
option is there in the first place - it was just a straightforward
thing to do. For normal Scheme code these stronger assumptions are
often not valid. But if you use Scheme as a target language for other
languages (compiler-generated or by using macros extensively), it may
be possible to generate code that will still be valid in strict-types
mode. 

If you think this isn't worth the trouble of users getting confused,
we can remove the option and declaration (or simply undocument it).


cheers,
felix



reply via email to

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