Using Scheme with Tk causes some difficulties which cannot satisfactorily be
resolved. Some problems are due to the very nature of Scheme, others are due to
Tk. Following, is a list of major of them
- R4RS requires that symbol must be case insensitive. Tk
imposes, in a certain extent, to the underlying interpretative language to
be case sensitive since command in event handler scripts take into account
the case of the letter following the % symbol.
- Another problem arises with lists and strings: Tcl doesn't
distinguish those two types. In particular, one can set an option as a string
and asking to Tk this option value will yield a list. This is not a problem in
Tcl since a list is only another vision of a string. Unfortunately, there is no
such direct equivalence in Scheme. Improvement of this point would probably
require a modification of the Tk library.
- One of the major assets of the Tk library is the send command.
With this command, a Tk application can ask to another running Tk interpreter to
evaluate an expression. Since Tk library is not modified, STK interpreters
cannot be distinguished from Tcl ones. Most of the time, this is confusing and
error prone because requests to an application must take into account the
language its underlying interpreter understands.
Keeping the communication possibility between STK an Tcl applications seems
to be suitable, but it would be fine to establish a standard way to
determine what kind of interpreter is running in a particular application.