[Top][All Lists]

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

Re: [Chicken-hackers] regression - probably in let*

From: Evan Hanson
Subject: Re: [Chicken-hackers] regression - probably in let*
Date: Sat, 4 Jul 2015 16:53:25 +1200

Hi Jörg,

It's as the others say: the scrutinizer differentiates between true and
false, so your assignment of one over the other breaks the assumptions
that strict-types implies. You'd have similar problems if you `set!` a
fixnum to a float, or an input-port to an output-port, and so on. With
strict-types, a variable should not change from any one of the types
listed on to any other.

That said, it would be useful if `:` or `the` could override inferred
types for this purpose, so that one could safely say, for example:

    (let ((a (the boolean #t)))
      (set! a #f)
      (if a 'either 'or))

(This might also make no sense; I'm not sure just now.)


reply via email to

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