Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6b311c70d31fe3b99f010fdaa1f223030172414f
Ticket: 1932618fffffffffffffffffffffffffffffffff
Enhance [proc] for anonymous functions and closures
User & Date: dkf on 2016-07-12 19:27:38
Changes

  1. closer changed to: "nobody"
  2. comment changed to:
    I would like to request that [proc] becomes a data type in addition to a command, so that procs can be
    
    
    - created on the fly, capturing the current environment and procedure stack
    - created anonymously, e.g. [proc {} {...}] would return a new proc to be used elsewhere.
    - returned by other proc's
    - given as arguments to other procs (including their arguments and the environment in which they were created)
    
    When this s possible, I think it would also be possible to have closures in Tcl and better capabilities for functional programming - which would enhance the language *a lot*
    
    Is it possible to have [proc] as a Tcl_Obj* type?
    
  3. login: "dkf"
  4. mimetype: "text/plain"
  5. severity changed to: "Minor"
  6. subsystem changed to: "22. [proc] and [uplevel]"