Overview
| Artifact ID: | da3ff04353b67b631fd12121f2a27c6e0a4532bb |
|---|---|
| Ticket: | 1011429fffffffffffffffffffffffffffffffff
Procedure-bound persistent vars |
| User & Date: | dkf on 2016-07-12 19:24:27 |
Changes
- closedate changed to: "2457582.30865159"
- closer changed to: "dkf"
- 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. :^) - icomment:
Coroutines give us the capability to do the effects from this.
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"