Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 04ce046a2f4f7c2e57dcea4607978ae89badecb1
Ticket: 1011429fffffffffffffffffffffffffffffffff
Procedure-bound persistent vars
User & Date: dkf on 2004-08-18 13:23:19
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    It'd be great if we could have variables associated
    with a procedure (specifically with a Proc structure
    instance) since that would make it much easier to do
    things like accumulator functions, unique id
    generators, etc.
    
    Further ideas on syntax:
      proc cmdName {formalArgs} {persistentVars} body
    The syntax of persistentVars would be a list like
    formalArgs.  If a default is present for a pv, set the
    pv to that value when the procedure is created. 
    Otherwise the pv is initially non-existant.  No special
    handling of 'args', of course.  All pvs to be
    automatically present in the local var env when
    executing the body, just like formals.  PVs are not
    (necessarily) modified when the procedure exits.  PVs
    are deleted when the proc is deleted.
    
    Probably also need [info] subcommand for introspection
    on PVs.  :^)
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "dkf"
  9. subsystem changed to: "22. [proc] and [uplevel]"
  10. title changed to: "Procedure-bound persistent vars"
  11. type changed to: "RFE"