TIP 546: Typedefs to Support Source-Compatible Migration

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Author:         Don Porter <[email protected]>
State:          Draft
Type:           Project
Tcl-Version:    8.7
Vote:           Pending
Created:        20-May-2019
Keywords:       Tcl, traces
Post-History:

Abstract

This TIP proposes new typedefs for the public interfaces of Tcl 8.7 and Tcl 9.0 to permit single-source-code extensions to be compiled and loaded in the ecosystem of each major Tcl release.

Background

Implicit constraints of many public Tcl routines have come to annoy programmers more and more as the years go by. Notably size limits prevent Tcl programs making full use of the resources of platforms that are utterly conventional today. Many TIPs for Tcl 9 directly call for new, binary-incompatible routines to overcome these limits. (Add references here).

The careful definition of typedefs can parameterize many of the changes needed, and in the process create tools for writing extensions with source code that bridges compatibility with both the Tcl 8 and Tcl 9 releases, and which can also assist with portability testing of the suitability of Tcl 9 on 32-bit platforms, even as fewer and fewer developers have routine access to them.

This TIP is in the Draft State, but it truly is in Draft form. Comments and contributions are actively encouraged.

Rationale

The following set of typedefs are useful for Tcl interface migration support:

Tcl_Size

Many arguments to public Tcl routines characterize the size of some other argument in terms of a count of smaller components it contains. Any argument like this needs to have a type that meets several criteria.

Tcl_Idx

Specification

Compatibility

Reference Implementation

Will be drafted in tip-546 branches.

Copyright

This document has been placed in the public domain.