TIP 673: Remove deprecated [trace] subcommands

Login
Author:         Don Porter <[email protected]>
State:          Final
Type:           Project
Vote:           Done
Created:        07-Jun-2023
Tcl-Version:    9.0
Tcl-Branch:     tip-673
Vote-Summary:	Accepted 5/0/0
Votes-For:	AK, BG, DGP, JN, SL
Votes-Against:	none
Votes-Present:	none

Abstract

This TIP proposes removal of [trace] subcommands deprecated since the release of Tcl 8.4.

Background

The built-in command [trace] originally empowered Tcl programmers to manage traces on Tcl variables. Starting in Tcl 8.4, a new capability was introduced to manage traces on the renaming or deletion of commands in an interpreter. The [trace] command was re-architected to be able to manage both kinds of traces, and was structured to be extensible to other types of traces. This extensibility was used again before release of Tcl 8.4.0 to introduce execution traces 62.

The original subcommands used to manage variable traces were left in place, but documentation in all releases Tcl 8.4.0 and later has declared them to be deprecated and expected to be removed in a future release.

Rationale

A new major release with an interface declared deprecated on day one is an odd thing. While there might be rare circumstances where a compelling need can justify it, the usual practice should be that if an interface is to be removed, the removal should be accomplished no later than the next major release. In the alternative, if the need for continuity is so strong as to compel preservation of a deprecated interface into a new major release, the decision to deprecate needs reconsideration.

Specification

Remove the subcommands variable, vdelete, and vinfo from the [trace] command implementation and documentation.

Compatibility

Any scripts using the removed subcommands will need converting to use the trace ... variable equivalents available in Tcl 8.4.0 and later.

Alternatives

If this TIP fails a TYANNOTT vote, that outcome will be taken as a decision to take these subcommands out of deprecated status, with appropriate updates to comments and documentation.

Copyright

This document has been placed in the public domain.