Difference in define behaviour between kawa.jar and embedded Scheme example
Per Bothner
per@bothner.com
Thu Nov 23 12:51:00 GMT 2017
On 11/23/2017 11:52 AM, Mark Raynsford wrote:
>
> OK, thanks. This is something I'm going to be looking into at the
> source. As you know, I'm putting together a gratuitously incompatible
> subset of the language, so I have no need for compatibility with
> tradition. I'd rather get hard errors up front. To be honest, I'd
> rather all redefines at the top-level be errors, but I assume this is
> something I'm going to have to implement myself.
Re-definitions are not allowed in files (modules), but they are allowed
in line-by-line mode (a REPL or a file processed with -f).
> I actually ran into this behaviour because I was informally testing my
> subclasses of Scheme/SchemeCompilation and was surprised that I could
> override existing bindings like this (because being able to affect the
> internals of existing definitions wasn't the behaviour I was used to
> from other Schemes).
Surely in most Schemes if f is implemented using gm and g is redefined,
then f will use the new definition (at least in a REPL)?
--
--Per Bothner
per@bothner.com http://per.bothner.com/
More information about the Kawa
mailing list