Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: da3ff04353b67b631fd12121f2a27c6e0a4532bb
Ticket: 1011429fffffffffffffffffffffffffffffffff
Procedure-bound persistent vars
User & Date: dkf on 2016-07-12 19:24:27
Changes

  1. closedate changed to: "2457582.30865159"
  2. closer changed to: "dkf"
  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. icomment:
    Coroutines give us the capability to do the effects from this.
    
  5. login: "dkf"
  6. mimetype: "text/x-fossil-wiki"
  7. resolution changed to: "Out of Date"
  8. severity changed to: "Minor"
  9. status changed to: "Closed"