Tcl Source Code

View Ticket
Login
Ticket UUID: 219285
Title: Tcl_Obj interface enhancement
Type: RFE Created on: 2000-10-26 05:09:56
Submitter: nobody Assigned to: dkf
Subsystem: 10. Objects Severity:
Priority: 6 Last modified: 2009-05-11 20:59:11
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.4a3
Description:
OriginalBugID: 2032 RFE
Version: 8.1
SubmitDate: '1999-05-10'
LastModified: '2000-04-02'
Severity: LOW
Status: UnAssn
Submitter: pat
ChangedBy: hobbs
OS: Other
OSVersion: This RFE applies to all operating systems and all future Tcl ver
Machine: NA
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
Jacob Levy

Comments:
I had hoped, based on a conversation with Brent, that this change would
    be in Tcl 8.1. It is not one of the many other good things that are
    described in the release notes, and I didn't find it in the Tcl 8.1
    sources, so it seems this RFE didn't make it in.
    
    As Tcl is increasingly being used in situations that require the
    presence of many extensions, I believe this RFE will become more and
    more important. For example, it would be extremely beneficial when both
    TclBlend and an ActiveX extension are used in the same Tcl, because both
    of these use TclObj objects in the way I described above.

DesiredBehavior:
Currently, it is difficult to manage two or more Tcl extensions that
    create TclObj objects that behave as procedures as well as values.
    Specifically, the conversion between use for procedures and use for
    values may lose information. This is because the conversion uses a
    specific field in the TclObj object to preserve information about the
    previous use. Each extension must assume that if that field is not NULL
    then it contains a value representing *its* previous use of that object.
    Obviously, with two or more extensions using the same field this will
    cause havoc.
    
    Based on a discussion with Brent Welch, I'd like to suggest an
    alternative approach to the way TclObj objects work: instead of doing
    type conversion when a different use is required, extend the functional
    interface to include "use-as-string" and "use-as-procedure" functions in
    addition to the current lifecycle functions. I can even see
    "use-as-list" and "use-as-associative-array" and many other functions.
User Comments:
dkf added on 2000-11-08 18:53:47:
This would be incompatible with many extensions; I doubt anything will get done before 9.0...

andreas_kupries added on 2000-11-17 19:17:00:
Note that Paul Duffin's Interfaces (in his Feather) are a generalization of this idea. We should get back in contact with him.