> On 21 Jan 2020, at 23:46, Esteban Maringolo <emaring...@gmail.com> wrote: > > I also like the polymorphism of the #value: message, not only with Symbols > but also with MADescriptions and many other uses.
Thanks this is exactly my point and I do not like it because this is cheap and put the hell on tools. Of course the alternative is a bit more verbose because if you want to have aCol do: MADescription new then you would have to have myDomain >> do: anObject …. …. anObject value: …. But this means that a type inferencer could see that your code is calling this domain >> do: with a MADescription Now we destroy all the knowledge because do: has as argument anything on earth. What a gain. We went from any do: argument is a block and your do: has a MA to any do: implementation can get any object. So forget do build nice tools. After we can all program with perform: everywhere, but the trade we make is lame. Symbol >> value: anObject ^anObject perform: self. I have no problem that libraries break the possibility to have better tools applied to them. To me having value in Object is bad. I’m fed up of our attitude. We are lame because we do not look further than our little nose. S. > > If that feds you up, and others too, maybe that "convention" (to use blocks > only) might be scoped to Pharo core (whatever that is) methods. > > Regards, > > El mar., 21 de enero de 2020 19:35, Sean P. DeNigris <s...@clipperadams.com > <mailto:s...@clipperadams.com>> escribió: > ducasse wrote > > in Pharo we should write > > aCol do: [ :each | each store ] > > I always enjoyed the Symbol/Block polymorphism because I thought it was such > a clever and visible example of the power of Smalltalk, and, let's face it, > I'm lazy and enjoyed saving a few key strokes! > > That said, I had no idea that there was a dramatic performance cost. Also, > the issues you raise about analysis seem important. > > Since people are free to still use it in their own projects, it doesn't seem > to controversial. Can/should we add a lint rule? Can/should it be scoped to > Pharo core? > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html > <http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html> >