|Anonymous | Login||10-28-2021 12:27 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Advanced Details [ Jump to Notes ]||[ View Simple ] [ Issue History ] [ Print ]|
|ID||Category||Severity||Reproducibility||Date Submitted||Last Update|
|0005294||[tweak] Any||minor||always||10-26-06 00:20||10-27-06 00:59|
|Summary||0005294: Method #any is unintuitive and collides with common usage.|
Recently I had the pleasure of porting a large pile of VW code to Croquet and found #any to be a problem. In most code I have seen, and in an informal poll I conducted at OOPSLA, most people expected #any to return an arbitrary element of a collection.
I would suggest that #any be renamed to somrthing like #anyIn or #anyMatchingIn. These have the advantage of being more descriptive and syntactically they indicate that something should follow them, such as the #match: method.
|Steps To Reproduce|
#all probably should be modified in a similar manner.
Looking in the Tweak code in Croquet, it looks like there aren't many places that #all and #any are called in currently.
(0007891 - 52 - 52 - 52 - 52 - 52 - 52)
|Agreed. It's on my own list of things to get rid of.|
(0007896 - 217 - 235 - 235 - 235 - 235 - 235)
In base Squeak, there is the method Collection>>anyOne that returns 1 arbitrary element of the collection. That would probably be a good choice for the name.
For #all, maybe #allOfThem ? Random suggestion, there.
|10-26-06 00:20||jdougan||New Issue|
|10-26-06 01:16||andreas||Note Added: 0007891|
|10-26-06 01:16||andreas||Status||new => acknowledged|
|10-27-06 00:59||ChrisC||Note Added: 0007896|
|10-27-06 00:59||ChrisC||Issue Monitored: ChrisC|
|10-27-06 01:55||ChrisC||Issue End Monitor: ChrisC|
|11-11-06 03:58||jdougan||Issue Monitored: jdougan|
| Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
44 total queries executed.|
31 unique queries executed.