[Pharo-project] MethodDictionary >> #do: deprecated
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone. Why not just removing the method and use the implementation in Dictionary? Romain -- Romain Robbes http://www.inf.unisi.ch/phd/robbes
in which image? Stef On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
in Pharo 10318 On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
Well, the previous implementation of MethodDictionary#do: (non- licence clean) looks like an optimization with some nil check. So far I didnt have any problem running with replacement code, and the super implementation in Dictionary should work fine too. Does someone know when/why nil values could be stored in a method dictionary? On 28 mai 09, at 11:25, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Simon
On May 28, 2009, at 11:37 AM, Simon Denier wrote:
Well, the previous implementation of MethodDictionary#do: (non- licence clean) looks like an optimization with some nil check. So far I didnt have any problem running with replacement code, and the super implementation in Dictionary should work fine too.
Does someone know when/why nil values could be stored in a method dictionary?
Maybe as a side effect of removing a method from the system? Romain
On 28 mai 09, at 11:25, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Simon
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
I really do not know from where this method is coming from. Scary. We will have to improve our tracability Stef On May 28, 2009, at 11:25 AM, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
I deprecated this method because it was not clean and there were no senders in the core. If this method is used, we should re-implement it. You cannot just use the super implementation. Method dictionaries internally include nil key/values just like Dictionaries do but MethodDictionary is implemented differently than Dictionary (its a variable subclass and the array contains values whereas the indexable part contains the keys). Adrian On May 28, 2009, at 12:30 , Stéphane Ducasse wrote:
I really do not know from where this method is coming from. Scary. We will have to improve our tracability
Stef
On May 28, 2009, at 11:25 AM, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
On 28 mai 09, at 14:02, Adrian Lienhard wrote:
I deprecated this method because it was not clean and there were no senders in the core.
If this method is used, we should re-implement it.
It is used by Fame/Moose/OCompletion, perhaps some others... So yes, should be re-implemented
You cannot just use the super implementation. Method dictionaries internally include nil key/values just like Dictionaries do but MethodDictionary is implemented differently than Dictionary (its a variable subclass and the array contains values whereas the indexable part contains the keys).
Adrian
On May 28, 2009, at 12:30 , Stéphane Ducasse wrote:
I really do not know from where this method is coming from. Scary. We will have to improve our tracability
Stef
On May 28, 2009, at 11:25 AM, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Simon
maybe just as that? do: aBlock ^ self valuesDo: aBlock at least if it is deprecated it should not change the behavior. Romain On May 28, 2009, at 2:02 PM, Adrian Lienhard wrote:
I deprecated this method because it was not clean and there were no senders in the core.
If this method is used, we should re-implement it.
You cannot just use the super implementation. Method dictionaries internally include nil key/values just like Dictionaries do but MethodDictionary is implemented differently than Dictionary (its a variable subclass and the array contains values whereas the indexable part contains the keys).
Adrian
On May 28, 2009, at 12:30 , Stéphane Ducasse wrote:
I really do not know from where this method is coming from. Scary. We will have to improve our tracability
Stef
On May 28, 2009, at 11:25 AM, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
On May 28, 2009, at 14:13 , Romain Robbes wrote:
maybe just as that?
do: aBlock ^ self valuesDo: aBlock
yes, looks good.
at least if it is deprecated it should not change the behavior.
Yes, you are right. The deprecation I did was wrong. Adrian
Romain
On May 28, 2009, at 2:02 PM, Adrian Lienhard wrote:
I deprecated this method because it was not clean and there were no senders in the core.
If this method is used, we should re-implement it.
You cannot just use the super implementation. Method dictionaries internally include nil key/values just like Dictionaries do but MethodDictionary is implemented differently than Dictionary (its a variable subclass and the array contains values whereas the indexable part contains the keys).
Adrian
On May 28, 2009, at 12:30 , Stéphane Ducasse wrote:
I really do not know from where this method is coming from. Scary. We will have to improve our tracability
Stef
On May 28, 2009, at 11:25 AM, Romain Robbes wrote:
in Pharo 10318
On May 28, 2009, at 11:12 AM, Stéphane Ducasse wrote:
in which image?
Stef
On May 28, 2009, at 10:48 AM, Romain Robbes wrote:
Each time methodDictionary >> #do: is invoked, I get a warning. Worse, if warnings are disabled, it will not do anything, which sounds error-prone.
Why not just removing the method and use the implementation in Dictionary?
Romain
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo- project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Romain Robbes http://www.inf.unisi.ch/phd/robbes
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (4)
-
Adrian Lienhard -
Romain Robbes -
Simon Denier -
Stéphane Ducasse