chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] are standard bindings write protected?


From: Felix Winkelmann
Subject: Re: [Chicken-users] are standard bindings write protected?
Date: Mon, 24 Nov 2003 07:17:58 +0100
User-agent: Opera7.21/Win32 M2 build 3218

Am 23 Nov 2003 13:33:38 +0100 hat Joerg F. Wittenberger <address@hidden> geschrieben:

For clarification: I assumed that I would _import_ 'abort', 'force',
'signal', '##sys#error' etc. from the 'library' unit and just 'set!'
the binding to a new value.  Should I really export those imported
bindings to get the replaced globally?  I'd say that would be counter
intuitive.

In a sense it is. `exporting' a variable means: use the global one,
shared by all code (through the symbol-table). If an identifier is not
exported, it will effectively be renamed.


At least it raises the question (for me) how other (standard) units
will behave.  Besides 'force' I'm replacing the exception handling
mechanism and it would kill me if the standard units would not
signaling their errors into my exception handler.


The current exception handler is global (via `(current-exception-handler)')
and it is explicitly meant for doing what you want. Replacing standard
procedures (like `force') may be a problem, since R5RS states that
redefinition of builtin procedures may not affect the behaviour of other
builtins.


cheers,
felix




reply via email to

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