The source code for Tcl is managed by fossil. Tcl developers coordinate all changes to the Tcl source code at
Release Tcl 8.7b1 arises from the check-in with tag core-8-7-b1 (not released yet).
Highlighted differences between Tcl 8.7 and Tcl 8.6 are summarized below, with focus on changes important to programmers using the Tcl library and writing Tcl scripts.
Internationalization of text
- Full Unicode range of codepoints
- New encodings:
utf-16/utf-32/ucs-2(le|be),CESU-8, etc. encodingoptions-profile,-failindexmanage encoding of I/O.msgcatsupports custom locale search listsourcedefaults to-encoding utf-8
Zip filesystems and attached archives.
- Packaging of the Tcl script library with the Tcl binary library,
meaning that the
TCL_LIBRARYenvironment variable is usually not required. - Packaging of an application into a virtual filesystem is now a supported core Tcl feature.
Unix notifiers available using epoll() or kqueue()
- This relieves limits on file descriptors imposed by legacy
select()and fixes a performance bottleneck.
Incompatibilities
Notable incompatibilities
- No
--disable-threadsbuild option. Always thread-enabled.
New Features
New commands
array default— Specify default values for arrays (note that this alters the behaviour ofappend,incr,lappend).array for— Cheap iteration over an array's contents.chan isbinary— Test if a channel is configured to work with binary data.coroinject,coroprobe— Interact with paused coroutines.clock add weekdays— Clock arithmetic with week days.dict getwithdefault— Define a fallback value to use whendict getwould otherwise fail.file home— Get the user home directory.file tempdir— Create a temporary directory.file tildeexpand— Expand a file path containing a~.info commandtype— Introspection for the kinds of commands.ledit— Equivalent tolreplacebut on a list in a variable.lpop— Remove an item from a list in a variable.lremove— Remove a sublist from a list in a variable.lseq— Generate a list of numbers in a sequence.package files— Describe the contents of a package.string insert— Insert a string as a substring of another string.string is dict— Test whether a string is a dictionary.tcl::process— Commands for working with subprocesses.*::build-info— Obtain information about the build of Tcl.readFile,writeFile,foreachLine— Simple procedures for basic working with files.tcl::idna::*— Commands for working with encoded DNS names.
New command options
chan configure ... -inputmode ...— Support for raw terminal input and reading passwords.clock scan ... -validate ...info loaded ... ?prefix?lsearch ... -stride ...— Search a list by groups of items.regsub ... -command ...— Generate the replacement for a regular expression by calling a command.socket ... -nodelay ... -keepalive ...vwaitcontrolled by several new optionsexprstring comparatorslt,gt,le,geexprsupports comments inside expressions
Numbers
0dNNNNformat to compel decimal interpretation.NN_NNN_NNN, underscores in numbers for optional readability- Functions:
isinf(),isnan(),isnormal(),issubnormal(),isunordered() - Command:
fpclassify - Function
int()no longer truncates to word size
TclOO facilities
- private variables and methods
- class variables and methods
- abstract and singleton classes
- configurable properties
method -export,method -unexport