[dict] "wrong # args" error inconsistencies
Closed / Fixedcb042d294ec00c41ecf0aa77a8e050183cd9ac6aCreated 13 years agoUpdated 12 years ago
Descriptionplain2014-05-21 23:56:38
% dict append
wrong # args: should be "dict append varName key ?value ...?"
% dict incr
wrong # args: should be "dict incr varName key ?increment?"
% dict lappend
wrong # args: should be "dict lappend varName key ?value ...?"
% dict set
wrong # args: should be "dict set varName key ?key ...? value"
% dict unset
wrong # args: should be "dict unset varName key ?key ...?"
% dict update
wrong # args: should be "dict update varName key varName ?key varName ...? script"
% dict with
wrong # args: should be "dict with dictVar ?key ...? script"
[dict with] is clearly the odd man out, being the only command to say "dictVar" instead of "varName". It must be following the example of [dict for] and [dict map] which also say "somethingVar" (and should probably say "somethingVarName"):
% dict for
wrong # args: should be "dict for {keyVar valueVar} dictionary script"
% dict map
wrong # args: should be "dict map {keyVar valueVar} dictionary script"
Back to [dict update]. It says "varName" multiple times. I suggest changing all but the first instance to "valueVarName".
wrong # args: should be "dict update varName key varName ?key varName ...? script"
Referenced by1
968e9ac311[cb042d294e] Improve consistency of [dict] wrong-args error messages. check-in2014-06-15 16:50:32
aku Ticket [cb042d294e]: 3 changes
[History diff]2014-05-22 00:13:10
dkfhtml2014-06-15 16:50:51
The most useful wording would actually be dictVarName in error messages (and dictionaryVariable on the manual page). What's more, for the places where iterators write variables, a consistent naming scheme (keyVarName valueVarName) is similarly a good idea.
Log in (anonymous is fine) to add a comment.