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: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] testcase -strict-types
Date: 24 Mar 2013 22:54:57 +0100

On Mar 24 2013, John Cowan wrote:

Jörg F. Wittenberger scripsit:

Note: in local procedure `doloop9',
 in toplevel procedure `foo#bar':
 (strcttps.scm:10) in procedure call to `null?', the predicate is
called with an argument of type
`null' and will always return true

That strikes me as Just Wrong.  Even if a predicate is known to always
succeed, it shouldn't be impossible to call it, any more than it should
be impossible to call a predicate that always returns #t on any argument.

Well,  if it's a predicate (as in #:pure) know to return a fixed boolean
value, it should reightfully be optimized out.  That's actually important
in cases like and-let* and also often handy when using macro expanded code.


Thus the test being optimized away looks correct to me.

The problem I see is that the "foobar" binding is mutated within the
doloop but chicken does not see it and hence believes it's still
for sure the initialization value when the doloop terminates.








reply via email to

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