[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] csc doesn't like functions with :'s, csi doesn't car
From: |
Damian M Gryski |
Subject: |
Re: [Chicken-users] csc doesn't like functions with :'s, csi doesn't care |
Date: |
Mon, 4 Apr 2005 10:13:01 -0400 |
User-agent: |
Mutt/1.5.8i |
On Mon, 04 Apr 2005, felix winkelmann wrote:
> Keywords (i.e. symbols starting with "#:" or ending with ":" (depending
> on the keyword-mode) are considered to be self-evaluating. Internally
> keywords are still symbols, with their (global) value slot being a pointer
> to the same symbol/keyword. The compiler "optimizes" unquoted keyword
> symbol accesses into a literal reference. The interpreter on the other
> hand simply retrieves the value slot, so this example works in the
> interpreter but not in the compiler.
> I'll change the compiler to issue a warning on keyword assignments,
> but this will not change the general situation. Is this a serious problem
> for you?
Not at all -- I was just playing around with some scheme code and
noted the behaviour difference between csc/csi. It was surprising
because guile/bigloo/s48 also didn't have any problems with the code,
so it looked to me like a bug in the chicken compiler.
However, it appears keywords are incompatible with other
implementations. In this case, I think a warning is adequate to alert
someone that their code might work differently under the chicken
compiler. I'm sure if somebody had a large amount of production
code to switch over, they'd prefer a '-disable-keywords' switch,
but that person isn't me :)
Damian
--
+==================== Damian Gryski || address@hidden ====================+
|"There is a crack, a crack in everything. That's how the light gets in."|
| 4F8882D5: 87F1 E4D7 085D 4BE4 ECF0 461F BC0A 3BCE 4F88 82D5 |
+========================================================================+
signature.asc
Description: Digital signature