---------- Forwarded message ----------
From: Panicz Maciej Godek <godek.mac...@gmail.com>
Date: 2013/10/1
Subject: Re: Guile interpeter crash
To: Dmitry Bogatov <kact...@gnu.org>


2013/10/1 Dmitry Bogatov <kact...@gnu.org>

>
> Here is code that results crash (return 134). Hope it is interesting.
>

The code you gave is not a proper Scheme program.
C.f.
http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8.html#%_sec_5.3,
excerpt:

Although macros may expand into definitions and syntax definitions in any
context that permits them, it is an error for a definition or syntax
definition to shadow a syntactic keyword whose meaning is needed to
determine whether some form in the group of forms that contains the
shadowing definition is in fact a definition, or, for internal definitions,
is needed to determine the boundary between the group and the expressions
that follow the group

In other words, you cannot redefine define. I suppose the interpreter falls
into infinite loop when it tries to substitute define# with define, and
then define -- with define#.
That being said, I don't think it's fortunate to use the # character within
a symbol.

Best regards,
M.

Reply via email to