Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-11-15
09:09 • Closed ticket [745853ffff]: dict for should be dict foreach plus 2 other... artifact: 6ca50694f9 user: jenglish
2003-05-31
01:20 • Ticket [745853ffff]: 4 changes artifact: 91b52c76bd user: jenglish
2003-05-30
21:14 • Ticket [745853ffff]: 5 changes artifact: 67d34e6bae user: dkf
01:21 • New ticket [745853ffff]. artifact: 6e080d2942 user: jenglish

[dict for] should be [dict foreach]

Closed745853ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 22 years ago
Descriptionplain2003-05-30 01:21:54
The [dict for] command is much closer to [foreach] than
it is to [for], and possibly ought to be named the same.

(This was also discussed while TIP 111 was under vote;
I forget what the consensus was, if any.  Note that
since [dict] uses the usual prefix matching for
subcommands, this is even a backwards-compatible change.)
dkfplain2003-05-30 21:14:05
Logged In: YES 
user_id=79902

*I* have a slight preference for [dict for], which is why I
wrote it that way (I'm not too happy about [foreach] for
iterating over lists either, FWIW) and why I don't intend to
write a TIP on the topic.  But if you want to, feel free. 
The implementation's trivial after all...
jenglishplain2003-05-31 01:20:16
Logged In: YES 
user_id=68433

I didn't think this would be a TIP-worthy change.

Anyway, I can live with the inconsistency; it won't be the
first (or last...) naming quirk in the language.
jenglish Closed ticket [745853ffff]. [History diff]2004-11-15 09:09:38
Log in (anonymous is fine) to add a comment.