Author: Jan Nijtmans <email@example.com> State: Final Type: Project Vote: Done Created: 08-Nov-2017 Post-History: Tcl-Version: 9.0 Tcl-Branch: tip-485
The "case" command, and the "read|puts ... nonewline" construct are replaced by better commands long ago (resp. "switch" and "read|puts -nonewline ..."), but the old forms were never actually removed from the Tcl code base. They still work. See also bug #3151675. For Tcl 9.0 it is finally time to actually remove it.
In addition, there are a number of C API's which have better successors
by now. Finally, there are a few C routines and other macros which were
never been properly documented before, like
CONST, or macros needed for
supporting deprecated C features, like
This TIP proposes to finally remove all of those in Tcl 9.0, and mark
them as deprecated in Tcl 8.7.
The "case" command is superseded by the "switch" command.
The "read <chan> nonewline" construct is superseded by "read -nonewline <chan>".
The "puts <chan> <line> nonewline" construct is superseded by "read -nonewline <chan> <line>".
The following C routines -- mostly macros -- like the "case" command have never been part of the documented interface of Tcl 8, and should be removed:
The following C macros don't serve any purpose any more, they will be removed in Tcl 9.0:
INLINE(just remove it)
TCL_DSTRING_STATIC_SIZEin stead, if you really have to)
_ANSI_ARGS_(just use '(' and ')')
LONG(windows-only, just use lower-case variant)
TCL_PARSE_PART1(flag for variable-related functions, has no effect any more)
Minor note: The macro
CONST86 is still kept, as this can be used
for extensions wanting to keep compatibility with Tcl 8.5. This macro
will become DEPRECATED in Tcl 9.0, but will not be removed yet.
The following types don't serve any purpose any more, they will be removed in Tcl 9.0:
Tcl_ValueType(enum, used by deprecated math-related functions)
Tcl_Value(struct, used by deprecated math-related functions)
Tcl_Backslash is superseded by
- The routine
Tcl_Backslashreturns a single-byte char. It cannot return all possible character values produced in Tcl backslash sequences. Moving to the successor routine fixes bugs.
Tcl_GetDefaultEncodingDir is superseded by
Tcl_SetDefaultEncodingDir is superseded by
Tcl_EvalTokens is superseded by
- The routine
Tcl_EvalTokensis incapable of reporting back to the caller the return code produced by evaluation. Moving to the successor routine fixes bugs inherent in not distinguishing different return codes.
Finally, the functions
are superseded by TIP #232
If Tcl 8.7 is compiled with the flag
-DTCL_NO_DEPRECATED, the "case" command,
the "read <chan> nonewline", and the "puts <chan> <line> nonewline"
constructs will be disabled. In Tcl 9.0 all related
code will actually be removed from the Tcl code base.
The following API's are declared deprecated in Tcl 8.7 and will be
fully removed in Tcl 9.0. If Tcl 8.7 is compiled with the flag
all deprecated API is disabled, by making those entries
putting 0 in the corresponding stub entries. This can be used by extensions
to see whether they are compatible with the next major Tcl release or not.
Those functions are already removed in the "novem" branch:
An implementation of this TIP can be found in the tip-485 branch. This branch is based on "core-8-branch" (Tcl 8.7), but can be trivially merged forward to trunk (Tcl 9.0).
Tcl_EvalFile was a candidate for removal as well.
This document has been placed in the public domain.