Skip to content
Tcl Source Code Artifact [38941f20d5]
Login

Artifact [38941f20d5]

Artifact 38941f20d51d7434510b508754274f8dacef960a:

Ticket change [38941f20d5] - New ticket [3048771fffffffff|3048771fff] <i>tailcall constraints chafe with control command procs</i>. by dgp on 2010-08-19 16:20:31.
D 2010-08-19T16:20:31
J assignee msofer
J cmimetype text/plain
J comment \nA\scelebrated\sfeature\sof\sTcl\sis\sthe\sability\sto\sreplace\nbuilt-in\scommands\swith\sfunctionally\sequivalent\sprocs.\nThe\sconstraints\son\s[tailcall]\sdiminish\sthat\sability.\n\nUtility\scommand\sfrom\sTIP\s90:\n\n%\snamespace\seval\scontrol\s{\n\s\s\s\s\sproc\sascaller\sscript\s{\n\s\s\s\s\s\s\s\s\sif\s{[info\slevel]\s<\s2}\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\sreturn\s-code\serror\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s"[lindex\s[info\slevel\s0]\s0]\scalled\soutside\sa\sproc"\n\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\svariable\sresult\n\s\s\s\s\s\s\s\s\svariable\soptions\n\s\s\s\s\s\s\s\s\sset\scode\s[uplevel\s2\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s[list\s::catch\s$script\s\s\s[namespace\swhich\s-variable\sresult]\s\\\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s[namespace\swhich\s-variable\soptions]]]\n\s\s\s\s\s\s\s\s\sif\s{$code\s==\s0}\s{\n\s\s\s\s\s\s\s\s\s\s\s\s\sreturn\s$result\n\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\sdict\sincr\soptions\s-level\s2\n\s\s\s\s\s\s\s\s\sreturn\s-options\s$options\s$result\n\s\s\s\s\s}\n\s}\n%\sproc\smyIf\s{cond\sbody}\s{\n\s\s\s\sset\sbool\s[control::ascaller\s[list\s::expr\s$cond]]\n\s\s\s\sif\s{!$bool}\sreturn\n\s\s\s\sreturn\s[control::ascaller\s$body]\n}\n%\sproc\sgood\s{}\s{if\s1\s{tailcall\sconcat}}\n%\sgood\n%\sproc\sbad\s{}\s{myIf\s1\s{tailcall\sconcat}}\n%\sbad\ntailcall\scan\sonly\sbe\scalled\sfrom\sa\sproc\sor\slambda\n
J foundin None
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 45.\sParsing\sand\sEval
J title tailcall\sconstraints\schafe\swith\scontrol\scommand\sprocs
J type Bug
K 3048771fffffffffffffffffffffffffffffffff
U dgp
Z bc686e93d7d0e02801e3a79824f3b55a