Thread from comp.lang.tcl (no replies yet)

Tcl 9.0.0 RELEASED
Posted by Don Porter <donald.porter@nist.gov> 6 days 2 hours ago

Tcl 9.0.0 Release Announcement
==============================

September 26, 2024

The Tcl Core Team is pleased to announce the release of Tcl 9.0.0.
This is the first stable release of Tcl 9.0.  This should replace all
prior alpha or beta releases.

Tcl is the Tool Command Language originated by John Ousterhout and his
team at U.C. Berkeley in the late 1980s.  Its development is continued
by the efforts of a global network of volunteers guided by the Tcl Core Team.

We would like to express our gratitude to all those who submit bug
reports and patches.  This information is invaluable in enabling us
to identify and eliminate problems. Such reports can be submitted here.

> [Tcl Ticket Tracker](https://core.tcl-lang.org/tcl/ticket)

We ask that you log in (anonymous if you wish) to create tickets.
This deters abuse of the ticketing system:

> [Tcl Contributor Login](https://core.tcl-lang.org/tcl/login)

Where to get the new releases
=============================

Tcl 9.0.0 sources are freely available as open source from the Tcl
SourceForge project's file distribution area:

> [Tcl Source Distribution](https://sourceforge.net/projects/tcl/files/)

The Tcl 9.0.0 distribution is source code only.  We keep links to some
third parties offering pre-built binaries for various systems here:

> [Tcl Binary Distribution](https://www.tcl-lang.org/software/tcltk/bindist.html)

Tcl Summary
===========

The Tcl distribution delivers C source code that builds into a C library
providing interpreters and related supports to execute programs  written
in the Tcl programming language.  Source code for the application program
`tclsh` is also included.  `tclsh` provides a shell for either interactive
execution of Tcl commands, or execution of files containing Tcl programs.

Tcl is an extensible language, and the Tcl C library provides interfaces
for the creation of extension libraries adding new commands and features
to the core Tcl command set.  Tcl 9 debuts the full feature set needed to
package an application written in C and Tcl into a single file executable
exploiting virtual filesystem archives.

Tcl 9 Release Summary
=====================

This is a new major version of Tcl.  When compared with the prior release
Tcl 8.6, there are new features to be enjoyed.  There are incompatibilities
to be considered.  A summary of the most noteworthy changes is found below.

We believe many Tcl programs written for Tcl 8 will run unchanged in Tcl 9.
We believe many more Tcl programs can be modified in small and simple ways
to produce a new program that runs in both Tcl 8 and Tcl 9.  We expect that
extensions and applications using Tcl's public C APIs will involve more
effort, but that it is still within reasonable reach to produce source code
supporting both Tcl 8 and Tcl 9 while both releases remain in widespread use.

The experiences of Tcl 8 users adapting their code to Tcl 9 will determine
the need for possible Tcl 8.7 releases that might supply additional lifecycle
and migration support.  Please use the Ticket Tracker to share your experiences
and difficulties.

See the following links for an accumulation of migration advice:

[Migrating C extensions to Tcl 9]
(https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9)

[Migrating scripts to Tcl 9]
(https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9)

There has been much progress already porting many known applications,
extensions, and packages in the Tcl world to compatibility with Tcl/Tk 9:

[Apps confirmed to work with Tcl 9]
(https://wiki.tcl-lang.org/page/Apps+confirmed+to+work+with+Tcl+9)

[Porting extensions to Tcl 9]
(https://wiki.tcl-lang.org/page/Porting+extensions+to+Tcl+9)

Tcl Improvement Proposals (TIPs)
================================

Each new user-visible feature in Tcl should find its origins in a Tcl
Improvement Proposal (TIP).  TIPs are published, edited, considered and
voted in public, and should contain valuable information about how a
feature came to be the way it is.  See the full collection here:

> [TIP Index](https://tip.tcl-lang.org/)

Tcl Changes Summary
===================

(from changes.md in the source code distribution)

The source code for Tcl is managed by fossil.  Tcl developers coordinate all
changes to the Tcl source code at

> [Tcl Source Code](https://core.tcl-lang.org/tcl/timeline)

Release Tcl 9.0.0 arises from the check-in with tag `core-9-0-0`.

Highlighted differences between Tcl 9.0 and Tcl 8.6 are summarized below,
with focus on changes important to programmers using the Tcl library and
writing Tcl scripts.

# Major Features

## 64-bit capacity: Data values larger than 2 GB
  - Strings can be any length (that fits in your available memory)
  - Lists and dictionaries can have very large numbers of elements

## Internationalization of text
  - Full Unicode range of codepoints
  - New encodings: `utf-16`/`utf-32`/`ucs-2`(`le`|`be`), `CESU-8`, etc.
  - `encoding` options `-profile`, `-failindex` manage encoding of I/O.
  - `msgcat` supports custom locale search list
  - `source` defaults to `-encoding utf-8`

## Zip filesystems and attached archives
  - Packaging of the Tcl script library with the Tcl binary library,
    meaning that the `TCL_LIBRARY` environment 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
  - Unqualified varnames resolved in current namespace, not global.
    Note that in almost all cases where this causes a change, the change is actually the removal of a latent bug.
  - No `--disable-threads` build option.  Always thread-enabled.
  - I/O malencoding default response: raise error (`-profile strict`)
  - Windows platform needs Windows 7 or Windows Server 2008 R2 or later
  - Ended interpretation of `~` as home directory in pathnames.
    (See `file home` and `file tildeexpand` for replacements when you need them.)
  - Removed the `identity` encoding.
    (There were only ever very few valid use cases for this; almost all uses
    were systematically wrong.)
  - Removed the encoding alias `binary` to `iso8859-1`.
  - `$::tcl_precision` no longer controls string generation of doubles.
    (If you need a particular precision, use `format`.)
  - Removed pre-Tcl 8 legacies: `case`, `puts` and `read` variant syntaxes.
  - Removed subcommands [`trace variable`|`vdelete`|`vinfo`]
  - Removed `-eofchar` option for write channels.
  - On Windows 10+ (Version 1903 or higher), system encoding is always utf-8.
  - `%b`/`%d`/`%o`/`%x` format modifiers (without size modifier) for `format`
    and `scan` always truncate to 32-bits on all platforms.
  - `%L` size modifier for `scan` no longer truncates to 64-bit.
  - Removed command `::tcl::unsupported::inject`.
    (See `coroinject` and `coroprobe` for supported commands with significantly
    more comprehensible semantics.)

## Incompatibilities in C public interface
  - Extensions built against Tcl 8.6 and before will not work with Tcl 9.0;
    ABI compatibility was a non-goal for 9.0.  In _most_ cases, rebuilding
    against Tcl 9.0 should work except when a removed API function is used.
  - Many arguments expanded type from `int` to `Tcl_Size`, a signed integer type
    large enough to support 64-bit sized memory objects.
    The constant `TCL_AUTO_LENGTH` is a value of that type that indicates that
    the length should be obtained using an appropriate function (typically `strlen()` for `char *` values).
  - Ended support for `Tcl_ChannelTypeVersion` less than 5
  - Introduced versioning of the `Tcl_ObjType` struct
  - Removed macros `CONST*`: Tcl 9 support means dropping Tcl 8.3 support.
    (Replaced with standard C `const` keyword going forward.)
  - Removed registration of several `Tcl_ObjType`s.
  - Removed API functions:
     - `Tcl_Backslash()`
     - `Tcl_*VA()`
     - `Tcl_*MathFunc*()`
     - `Tcl_MakeSafe()`
     - `Tcl_(Save|Restore|Discard|Free)Result()`
     - `Tcl_EvalTokens()`
     - `Tcl_(Get|Set)DefaultEncodingDir()`
     - `Tcl_UniCharN(case)cmp()`
     - `Tcl_UniCharCaseMatch()`
  - Revised many internals; beware reliance on undocumented behaviors.

# New Features

## New commands
  - `array default` — Specify default values for arrays (note that this alters the behaviour of `append`, `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.
  - `const`, `info const*` — Commands for defining constants (variables that can't be modified).
  - `dict getwithdefault` — Define a fallback value to use when `dict get` would 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 to `lreplace` but 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 ...`
  - `vwait` controlled by several new options
  - `expr` string comparators `lt`, `gt`, `le`, `ge`
  - `expr` supports comments inside expressions

## Numbers
  - <code>0<i>NNN</i></code> format is no longer octal interpretation. Use <code>0o<i>NNN</i></code>.
  - <code>0d<i>NNNN</i></code> format to compel decimal interpretation.
  - <code>NN_NNN_NNN</code>, 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`

# Known bugs
  - [changed behaviour wrt command names, namespaces and resolution](https://core.tcl-lang.org/tcl/tktview/f14b33)
  - [windows dos device paths inconsistencies and missing functionality](https://core.tcl-lang.org/tcl/tktview/d8f121)
  - [zlib-8.8, zlib-8.16 fail on Fedora 40, gcc 14.1.1](https://core.tcl-lang.org/tcl/tktview/73d5cb)
  - [Temporary folder with file "tcl9registry13.dll" remains after "exit"](https://core.tcl-lang.org/tcl/tktview/6ce3c0)

For additional information:
===========================

Please visit the Tcl Developer Xchange web site:

> [Tcl Developer Xchange](https://www.tcl-lang.org/)

This site contains a variety of information about Tcl/Tk in general, the
core Tcl and Tk distributions, Tcl development tools, and much more.

--
Tcl Core Team and Maintainers
Don Porter, Tcl Core Release Manager

-- 
| Don Porter            Applied and Computational Mathematics Division |
| donald.porter@nist.gov             Information Technology Laboratory |
| http://math.nist.gov/~DPorter/                                  NIST |
|______________________________________________________________________|

Click on article to view all threads in comp.lang.tcl