Re: Enhance [proc] for anonymous functions and closures
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Wed, 02 Apr 2008 16:09:01 -0500
I think this needs to be TIPed. See: wiki.tcl.tk/TIP
EL wrote:
Hi,
I have filed the feature request below to the tracking system at http://tcl.sourceforge.net/ and would like to have some feedback from other users here as well...
How realistic is this, and how desireable? Is it possible at all, in a certain time frame and what would this time frame be, approximately?
Asking as somebody who has no clue about interpreter implementation and very few clue about compiler implementation...
Thanks,
Eckhard
----- Feature Request 1932618 -----
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?
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- References:
- Prev by Date: How can i skip lines under certain conditions
- Next by Date: Re: How can i skip lines under certain conditions
- Previous by thread: Enhance [proc] for anonymous functions and closures
- Next by thread: Re: Enhance [proc] for anonymous functions and closures
- Index(es):
Relevant Pages
|