From: SourceForge.net <no...@so...> - 2009-10-01 19:16:59
|
Feature Requests item #1553630, was opened at 2006-09-06 15:44 Message generated for change (Settings changed) made by dgp You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=1553630&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 45. Parsing and Eval Group: None >Status: Closed >Resolution: Rejected Priority: 5 Private: No Submitted By: Don Porter (dgp) Assigned to: Don Porter (dgp) Summary: standardize [subst] exception treatment Initial Comment: Question arose on the chat: % catch {subst {0[return -level 0 -code 6 foo]1}} m o 0 % set m 0foo1 % set o -code 0 -level 0 Should [subst] really be swallowing up extension exception codes like that? ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2007-02-22 12:48 Message: Logged In: YES user_id=80530 Originator: YES Doc review also reveals that the behavior noted in the original report here did get documented in Tcl 8.4, so making changes is a matter of a (mildly incompat) Feature Request, not a bug report. Shifting report to the RFE Tracker... ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2007-02-22 12:45 Message: Logged In: YES user_id=80530 Originator: YES upon further review, the feasibility/ease of bytecompiling [subst] is mostly independent of this issue. Even if [subst] had always handled extension exception codes in a standard way, a byte compiled version of [subst] would still need special crafting to duplicate [subst]'s handling of the break, continue, and return codes from Tcl's built-in set. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2007-02-21 17:42 Message: Logged In: YES user_id=79902 Originator: NO The current non-standard exception code handling in [subst] is probably "because it happened to be convenient to implement that way". I'd not stand in the way of any represenation that it is a bug that needs fixing... ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2007-02-21 14:20 Message: Logged In: YES user_id=80530 Originator: YES Note that this (mis-)behavior appears to be an obstacle to bytecompiling [subst], since any compiled version would have to match these non-standard treatments of exception codes. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2006-09-06 16:00 Message: Logged In: YES user_id=80530 It appears that the interface for Tcl_SubstObj() is a contributor to this "design". Since it returns either NULL, or the substituted result, it has no way to indicate other types of exception conditions. Thus, as implemented, [subst] is similarly constrained. Seems similar in spirit to the problem that Tcl_EvalTokens() had. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=360894&aid=1553630&group_id=10894 |