Greetings to everyone. Recently i started my pre-bachelor's work called "New
Collections for Pharo". ( introduction to my project <http://forum.world.st/New-Pharo-Collections-td4794762.html> ) I decided to start with the MultiDictionary. There is a very basic prototype available on my project page on smalltalkhub <http://smalltalkhub.com/#!/~OBrenchev/NewPharoCollections> You can also read my post <http://pillarhub.pharocloud.com/hub/brenchev/duntw01nrp9hkz6a00qmi16c5> about this implementation on PillarHub. At this point, i need your help, users and developers of Pharo! Feel free to make your suggestions about functionality of MultiDictionary that you need. Also, I'll really appreciate your suggestions about code style and in programming with Pharo in general. Thank you and best wishes. -- View this message in context: http://forum.world.st/New-Pharo-Collections-Question-about-MultiDictionary-tp4808660.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. |
I took a quick look at the current API and I have one small suggestion: I think it would make sense to add a message #at:add: (the selector is just an example) and then use that to implement #add: like so (again, just an example): add: anAssociation self at: anAssociation key add: anAssociation value This why users are not required to use associations, which are simply intermediate objects in many cases. If you have large collections you don’t want to create those intermediate objects. Cheers, Max
|
Hello Alexander
May be MultiValuesDictionary would be a better name. "As You can understand from name of this collection, the multi-dictionary is dictionary which stores a pairs which looks like "key - array of values"." Don't expect that people can understand... Did you define some tests? I suggest that you check all the dictionary API and tests. Do you store an array or an ordered collection? Stef Le 1/3/15 14:39, Max Leske a écrit :
|
Thank you for all of your suggestions. I also think, that name "MultiValue Dictionary" suits to this collection much better. I am not so good at TDD for now, but I'll try to do my best. Tests are coming. Values are stored in ordered collection. So, I'll just explore the whole Dictionary API and try to rework some methods to the idea of values stored in ordered collection, if they'll need this. I'll also think about Max's idea of add: implemetation. Best wishes Alexander Brenchev |
Free forum by Nabble | Edit this page |