Why [incr Tcl] patches the core?


A general-purpose namespace facility is included in and forms the main premise for the [incr Tcl] object system. The patching of the core is required for the [incr Tcl] to include this namespace facility. Why these patches are kept separate from the remaining part of [incr Tcl] is because developers hope of them to be adopted by the Sun Systems some day and get directly integrated into the core.

How to use the [incr Tcl] with the other extensions?
The [incr Tcl] features its own unique Tcl Tk version which supports namespaces. It is this Tcl Tk version that must be used as basis for all other applications. The namespace support is expected to become an integral part of the standard distribution in the future. Other extensions can be added into the [incr Tcl] by following the regular instructions as applicable in case of Tcl Tk.

What’s meant by a scoped value?
It’s a list comprising of three different elements: ‘@scope’ keyword, a value string and a namespace context. Scoped value provides a method for capturing a variable name’s or a command string’s namespace context, so that the proper context gets restored when it’s employed later.

What namespaces are employed for accessing variables or evaluating commands for Tk widgets?
The evaluation of code fragments and ordinary variable names happens using the global namespace. It’s the same as in case of vanilla Tcl Tk, thus providing backward compatibility with the existing Tcl Tk based applications. It becomes mandatory to configure the widget with scoped values if it’s expected to use variables and commands in local namespace.