chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] serious bug ? in units and set!


From: Thomas Chust
Subject: Re: [Chicken-hackers] serious bug ? in units and set!
Date: Tue, 22 Sep 2009 22:49:04 +0200

2009/9/22 Jim Ursetto <address@hidden>:
> I thought I explained why.  foo is a hidden binding in test2.scm and
> there is no initial value in test2.scm so the compiler feels free to
> simply assign 'whiz to foo starting off, [...]

Hello,

I do understand that, but first the behaviour feels strange
nevertheless and second this still doesn't explain why the (format
...) expression is evaluated at compile time instead of at runtime.
The format procedure can, and in my example it does, have side
effects, so the call shouldn't simply be replaced with its result even
if the variable foo is optimized away and replaced by the only value
it ever takes in the compilation unit.

I guess to make the compiler happy, one simply shouldn't use the side
effecting form of format and employ the printf family of procedures
instead ;-) And as far as strange inter compilation unit dependency
issues are concerned, I would just use CHICKEN 4 modules to avoid most
of the trouble elegantly :-)

Ciao,
Thomas


-- 
All these theories, diverse as they are, have two things in common: They
explain the observed facts, and they are completely and utterly wrong.
                               -- Terry Pratchett, "The Light Fantastic"




reply via email to

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