|
2016-03-08
| ||
| 03:44 | • Ticket [85b87a7570] TclByteArrayMatch - unused? premature opt? status still ... artifact: 042521457d user: dgp | |
|
2016-03-07
| ||
| 19:32 | • New ticket [85b87a7570]. artifact: f8c03af7ea user: dgp | |
TclByteArrayMatch - unused? premature opt?
Open85b87a7570d65ad9ab32c63a18e91400724e4557Created 11 years agoUpdated 11 years ago
Descriptionplain2016-03-07 19:32:18
The routine TclByteArrayMatch() in tclUtil.c is not covered at all by the test suite. Is there any actual known or expected use case that justifies it? Or just code for code's sake?
dgpplain2016-03-08 03:44:58
Ok, the routine originated here: http://core.tcl.tk/tcl/info/d6f120464eb07ce6 but apparently before it was realized that it was only appropriate for pure bytearray values because the string -> bytearray transformation is not a reversible one. Once it is realized that the routine can only be used for pure bytearrays and is constrained to only be called on pure bytearrays, then defining it makes roughly as much sense as defining a "string match" routine specialized to lists -- not much. I'm not compelled to remove it just to remove it, but I'll try to remember how useless it is if/when it becomes an obstacle to internal reform efforts.
Log in (anonymous is fine) to add a comment.