declaring variants/subports in loops and loop variables

Brandon Allbery allbery.b at gmail.com
Wed Dec 7 18:35:04 CET 2016


On Wed, Dec 7, 2016 at 6:32 PM, René J.V. Bertin <rjvbertin at gmail.com>
wrote:

> In this case it indeed won't work because $code is not evaluated
> immediately inside `proc variant` but is instead used to create a procedure
> that's invoked if the user activates a variant


Right, that was implicit in my description of the problem; there's an
additional level here, and the vars you want need to come from that level,
and Tcl has no good way to do that since it usually requires a closure and
Tcl doesn't do closures.

(iirc you can get into the same mess with python 2, although maybe not in
2.7)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20161207/9a34c424/attachment-0001.html>


More information about the macports-dev mailing list