Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-03-24
21:45 • Closed ticket [1213da1166]: TIP #601 text should not suggest that "-strict&... artifact: 339211bb47 user: jan.nijtmans
2023-02-14
13:33 • Ticket [d92ec5a2d4] TIP 346 not marked as provisional for Tcl 8.7 status sti... artifact: b54a7dd8d5 user: pooryorick
2023-02-10
15:50 • Ticket [1213da1166] TIP #601 text should not suggest that "-strict" is... artifact: fc405656fb user: jan.nijtmans
15:27 • Ticket [1213da1166]: 3 changes artifact: a4876aa526 user: kevin_walzer
2023-02-09
17:00 • Pending ticket [1213da1166]. artifact: 17fe2c0022 user: jan.nijtmans
13:58 • Ticket [1213da1166]: 3 changes artifact: 6f2aff949b user: kevin_walzer
09:46 • Ticket [1213da1166]: 3 changes artifact: 7475355329 user: jan.nijtmans
2023-02-08
22:38 • Ticket [1213da1166]: 3 changes artifact: e0c0a2112d user: pooryorick
19:58 • Ticket [1213da1166]: 3 changes artifact: 1cf8fbf36c user: pooryorick
12:40 • Ticket [1213da1166]: 3 changes artifact: 7383bab83d user: pooryorick
12:15 • Ticket [1213da1166]: 3 changes artifact: 88f4668915 user: pooryorick
12:12 • Ticket [1213da1166]: 3 changes artifact: d4379276a0 user: pooryorick
09:42 • Ticket [1213da1166]: 3 changes artifact: 8c210e0ea1 user: jan.nijtmans
09:42 • Ticket [1213da1166]: 4 changes artifact: ee04ea7806 user: jan.nijtmans
2023-02-07
22:14 • New ticket [1213da1166]. artifact: 21c167ad7b user: jan.nijtmans

TIP #601 text should not suggest that "-strict" is the default

Closed / Out of Date1213da116603694f3d1b3199d96142568721cf26Created 4 years agoUpdated 4 years ago
Descriptionwiki2023-02-07 22:14:27
From this document:
TIP 601 specifies strictness is the default (as seems to be the case for ascii e.g.) while TIP 346 implies it is not (else why have the -strict option)?'

So, the TIP #601 text should not suggest that "-strict" is the default (which didn't exist yet when this TIP was voted upon).

Referenced by1
  • b54a7dd8d5Ticket [d92ec5a2d4] TIP 346 not marked as provisional for Tcl 8.7 status still Open with 3 other changes ticket2023-02-14 13:33:56
jan.nijtmansplain2023-02-08 09:42:15
Proposed fix [https://core.tcl-lang.org/tips/vdiff?from=61dc2a9f409538cc&to=a9041448441c1f77|here]
jan.nijtmanswiki2023-02-08 09:42:30

Proposed fix here

pooryorickwiki2023-02-08 12:12:26

I believe that TIP 601 correctly implies exactly that: "-strict" should be the default in Tcl 9.0.

pooryorickwiki2023-02-08 12:15:30

To expand on the theme: Bugs in previous versions of character encoders should not be the default in Tcl 9. The bugs should be fixed, the encoders should conform to their respective specifications, and by default an error should be raised when data that does not conform is encountered. This is the intention of TIP 601, so this bug report is invalid.

pooryorick Ticket [1213da1166]: 3 changes [History diff]2023-02-08 12:40:05
pooryorickwiki2023-02-08 19:58:49

The proposed fix would apply "-strict" to Tcl 9.0, which would be a complete mistake.

TIP 346 is for Tcl version 8.7, and TIP 601 is for Tcl version 9.0. "-strict" should be limited to 8.7 as it is not needed in 9.0, since TIP 601, clearly states that an exception should be thrown on any conversion error. TIP 601 precedes TIP 346. TIP 346 subsequently adopted the term "-strict" to mean "make the TIP 8.7 encoders/decoders behave as specified in TIP 601 for Tcl 9.0", i.e. make them conform to their respective specifications, and cause any encoding error to result in an error at the script level. "-strict" in 8.7 is merely a patch to make 8.7 behave as 9.0 behaves as a result of the introduction of TIP 601. TIP 601 establishes "-nocomplain" as the option that reverts to backwards-compatible behaviour. TIP 346 would directly conflict with TIP 601 if it were applied to Tcl 9.0. Therefore TIP 346 should be considered to be a TIP that is strictly limited to 8.7 for the purpose of allowing users of version 8.7 to optionally enable the behaviour of the future version, 9.0.

pooryorickwiki2023-02-08 22:38:17

This attempt to hack TIP 601 is an attempt to subvert the intent of TIP 601 by drawing an artificial distinction between byte conversion and character conversion for no reason other than to create enough of a loophole to allow TIP 346 to break out of version 8.7 and infect 9.0 as well. Furthermore, this hack attempts to change the semantics of TCL_ENCODING_NOCOMPLAIN so that it does something quite different than it originally did. TIP 601 made encoding errors script errors. That was the intent of it, and that's the way it should remain. The "-strict" option has no business in Tcl version 9.0, except perhaps as a result of some new TIP that gives it new semantics. TIP 601 should be updated via a new TIP, not by hacking it up.

TIP 346 is the TIP that has the real problems. On the one hand, it proposes an option, "-strict" to make Tcl 8.7 behave like Tcl 9.0 by making encoding errors script errors. On the other hand, it proposes an option, "-strict", to make changes to Tcl's utf-* encoders/decoders. These two changes are orthogonal, and combining them into one TIP, and further into a single option, has caused all sorts of trouble. TIP 346 should be withdrawn and replaced by at least two separate TIPs.

jan.nijtmanswiki2023-02-09 09:46:17

Let's see what Harald (the writer of this TIP) and François, Jos, Kevin, Marc and Steve (who voted YES to this TIP) have to say about it (despite the danger being shot by @pouryorick)

kevin_walzerwiki2023-02-09 13:58:37

When I voted on TIP 601, I understood its behavior to correspond roughly to a default "-strict" option, even if only implicit, for 9.0. When I voted on TIP 346, I understood it to be adding similar behavior to 8.7 with an explicit "-strict" option. This does not seem complicated to me.

I do not support changing the text of a TIP after the fact unless there is some sort of egregious error. Any clarifications should go in the man page, or perhaps in a subsequent informational TIP, not in the original TIP text, which is there to document the change but also serve as a historical record.

jan.nijtmanswiki2023-02-09 17:00:26

> I do not support changing the text of a TIP after the fact ...

One of the reasons I'm starting this ticket is exactly that. Fact is: that there have been various TIP edit's after the vote already. How big should the error be, and how should we decide whether an after-vote is acceptable or not? We have some examples now, which can form a base on such a discussion.

TIP #601 is currently under debate. A new one could be written or the errors could be fixed (and - of cource - we should discuss whether the voted TIP correctly represented the implementation and/or the original intention).

I don't have a definite answer now.

kevin_walzerwiki2023-02-10 15:27:25

Conceptually, TIP 601 and 346 complement each other. Both implement default behavior for their targeted Tcl versions, and implement optional behavior for compatibility, which should be documented in the man pages. I do not understand why it is necessary to change the language of 601. If there are bugs in the implementation, they should be fixed, but that should not require a retroactive modification of the language of the TIP.

I am not taking a position on all of the encoding arguments that PY and other have raised during the recent discussions on-list - they are outside my expertise. But I can say that JN has not persuaded me that the text of this TIP needs revision.

jan.nijtmanswiki2023-02-10 15:50:51

> But I can say that JN has not persuaded me that the text of this TIP needs revision

So, there's work for me to do. Thanks!

jan.nijtmanswiki2023-03-24 21:45:17

Since TIP #601 is Withdrawn now, this ticket has no meaning any more.

Log in (anonymous is fine) to add a comment.