[Pharo-project] OB enhancement Object>>asArray considered harmful
Hello guys, i do not post this to OB list, because i'm too lazy to subscribing to it, and i know that OB people is here :) I don't think that such enhancement pays for error-free code asArray ^ Array with: self recently i made own class (a kind of linked list), and forgot to add #asArray implementation to it. And i lost 2 hours trying to understand why my code does not working and getting Array with: myList where i expecting to see array of myList elements. -- Best regards, Igor Stasenko AKA sig.
i do not post this to OB list, because i'm too lazy to subscribing to it, and i know that OB people is here :)
I don't think that such enhancement pays for error-free code asArray ^ Array with: self
I think Juraj added this method for the tree he contributed. I acutally don't think it's needed anymore, you should be able to safely remove it. If not, please let me know. David
2009/3/5 David Röthlisberger <squeak@webcitas.ch>:
i do not post this to OB list, because i'm too lazy to subscribing to it, and i know that OB people is here :)
I don't think that such enhancement pays for error-free code asArray    ^ Array with: self
I think Juraj added this method for the tree he contributed. I acutally don't think it's needed anymore, you should be able to safely remove it. If not, please let me know.
Surely, i can remove it from my image, but not from OB package which adds this extension to Object class.
David
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
Name: OB-Enhancements-CB.312 Author: CB Time: 5 March 2009, 3:18:34 pm UUID: cae3e197-dd58-403a-8161-49f38bbb610b Ancestors: OB-Enhancements-damiencassou.311 removed Object>>asArray
2009/3/5 Cédrick Béler <cdrick65@gmail.com>:
Name: OB-Enhancements-CB.312 Author: CB Time: 5 March 2009, 3:18:34 pm UUID: cae3e197-dd58-403a-8161-49f38bbb610b Ancestors: OB-Enhancements-damiencassou.311
removed  Object>>asArray
so fast?! i expected a discussion and arguments :) My argument: this method belongs to a collections protocol (like #isEmpty) and should not have a default implementation.
- Show quoted text - _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
removed  Object>>asArray
so fast?! Â i expected a discussion and arguments :) My argument: this method belongs to a collections protocol (like #isEmpty) and should not have a default implementation.
I quite agree... and your 2 hours looking for the error is a good reason to me (unexpected behavior). and it doesn't seem to be used in OB Enhancement anymore, so ok to remove it ? ;) Cédrick
2009/3/5 Cédrick Béler <cdrick65@gmail.com>:
removed  Object>>asArray
so fast?! Â i expected a discussion and arguments :) My argument: this method belongs to a collections protocol (like #isEmpty) and should not have a default implementation.
I quite agree... and your 2 hours looking for the error is a good reason to me (unexpected behavior).
and it doesn't seem to be used in OB Enhancement anymore, so ok to remove it ? ;)
haha... We givng you my permission
Cédrick - Show quoted text - _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
participants (3)
-
Cédrick Béler -
David Röthlisberger -
Igor Stasenko