Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 660d33cbaaa59167e64229a477b8c5c7ff104ee84e6fa760ebc072e198666fdf
Ticket: b5bd08df8d61b4ea9bf0cc885f790b367c430a9f
The "int" type registration should be restored.
User & Date: griffin on 2022-11-17 18:48:44
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    TIP #484 removed the registration for Tcl_ObjType "int".  The TIP proposes merging the "int" and "wideint" types into a single 64-bit int value.  The change is fundamentally a change in the internal rep, collapsing the 2 integer types into 1.  The justification is basically a simplification of the system when dealing with integer values.
    
    The TIP then goes on to describe the remove of the "int" and "wideint" type registractions, without really explaining why. I can only assume that the reasoning was based on the internal rep changes, and fears that external code could fail when blindly assuming the "int" internal rep.  If that is the case, then the offered work arounds don't solve the issue, other than forcing developers to look at their code.  If an internal rep change is all that is required to negate the registration of a type, then why wasn't the "list" type registration removed when it's internal rep was changed with TIP #625?  Taking one step back, what is the point of the registration mechanism?  Why does it exist?  What are the rules for it?
    
    Looking at 2 of the cited extensions that use Tcl_GetObjType("int"), they are both employed for the purpose of value classification only.  Never is the internal rep accessed directly.  Looking at other cases for Tcl_GetObjType(), they are used to access the type's Set*FromAny, or UpdateString functions.  To generalize, The Tcl_ObjType is a "class", and the 2 prominent use cases are "is a" and "method" calls. I'm not aware of any case where internal rep inspection or manipulation is desired or necessary.
    
    My request is that the registration of "int" be put back.  If, for some reason, there is no consensus on this, then I seriously question why *any* type should be registered at all.
    
  5. foundin changed to: "8.7, 9.0a4"
  6. is_private changed to: "0"
  7. login: "griffin"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "21780c4e03cc5884af69addd6efc1b71c50d9818"
  10. resolution changed to: "None"
  11. severity changed to: "Severe"
  12. status changed to: "Open"
  13. submitter changed to: "griffin"
  14. subsystem changed to: "10. Objects"
  15. title changed to: "The "int" type registration should be restored."
  16. type changed to: "Bug"