mirror of
https://github.com/tcltk/tcl.git
synced 2026-05-29 00:27:49 +08:00
4.5 KiB
4.5 KiB
The source code for Tcl is managed by fossil. Tcl developers coordinate all changes to the Tcl source code at
Release Tcl 9.1a2 arises from the check-in with tag core-9-1-a2.
Highlighted differences between Tcl 9.1 and Tcl 9.0 are summarized below, with focus on changes important to programmers using the Tcl library and writing Tcl scripts.
New commands and options
- New options
-backslashes,-commandsand-variablesforsubstcommand - New command
unicodefor Unicode normalization - New
timercommand, switch to monotonic clock and microsecond resolution - Remove
exprbehavior fromlseqIncompatibility - File paths are now treated as case-insensitive on MacOS Incompatibility
- New command
tcl::registryas a synonym for theregistrycommand without needing the registry package to be loaded. The registry module is now part of the core Tcl DLL in all build configurations. - New
lfiltercommand for selecting items from a list - Many new functions from C99, specifically:
acosh(),asinh(),atanh(),cbrt(),copysign(),dim(),erf(),erfc(),exp2(),expm1(),fma(),gamma(),ldexp(),lgamma(),log1p(),log2(),logb(),nextafter(),remainder(),signbit(), andtrunc(), and (for functions that return multiple values in their C99 API) the commands:divmod,frexp,modf, andremquo. (See this page for more information about these functions; the Tcl functions are intentionally only thin wrappers around the functions in the C99 standard.)
New public C API
Tcl_IsEmpty()— checks if the string representation of a value would be the empty stringTcl_GetEncodingNameForUser()— returns name of encoding from user settingsTcl_AttemptCreateHashEntry()— version ofTcl_CreateHashEntry()that returns NULL instead of panic'ing on memory allocation errorsTcl_ListObjRange(),Tcl_ListObjRepeat(),Tcl_ListObjReverse()— C API for new list operationsTcl_UtfToNormalized(),Tcl_UtfToNormalizedDString()— C API for Unicode normalizationTcl_UtfToExternalEx()andTcl_ExternalToUtfEx()— C encoding API supporting output buffers larger than INT_MAX- New API for monotonic clock and microseconds resolution
- Windows
auto_execokenhancements andexecsearch reform
Changes in interpreter initialization
- Custom applications must call Tcl_FindExecutable or TclZipfs_AppHook to initialize Tcl Potential incompatibility
- Search path for locating Tcl core script and encodings is changed Potential incompatibility
Performance
- Memory efficient internal representations for list operations on large lists.
- Continued 64-bit capacity: Command line arguments larger than 2Gb
- Substantial speedup in interpreter creation
- Support for long paths on Windows
Bug fixes
- Inconsistent
globmatching on MacOS file normalizedoes not uniquely identify a file on MacOS- Inconsistencies between
cdandfile normalizefor volume-relative paths on Windows - Tcl cannot run from an arbitrary build directory with --disable-zipfs
Updated bundled packages, libraries, standards, data
- Unicode 18.0.0 (draft)