Why was #asLegalSelector removed?
As mentioned in Stephan's recent comment in https://pharo.fogbugz.com/default.asp?13754 , some of us were using it. What was the rationale? Maybe removing methods warrants a discussion on the list? How about deprecations? ----- Cheers, Sean -- View this message in context: http://forum.world.st/Why-was-asLegalSelector-removed-tp4806427.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Because we were analysing the string API and trying to clean it. Now this analysis is publicly available on https://github.com/pharo-project/pharo-workingRoadmaps/blob/master/StringCle... Now I'm quite sure that I do not want to get such behavior into string: why string is responsible to convert junk into a "selector" which cannot even accept the fact that it could need a : This code is bogus and shitty. Stef asLegalSelector "'234znak 43 ) 2' asLegalSelector2" | toUse | toUse := self select: [:char | char isAlphaNumeric]. (toUse size = 0 or: [ toUse first isLetter not ]) ifTrue: [ toUse := 'v', toUse ]. ^ toUse withFirstCharacterDownshifted
As mentioned in Stephan's recent comment in https://pharo.fogbugz.com/default.asp?13754 , some of us were using it. What was the rationale? Maybe removing methods warrants a discussion on the list? How about deprecations?
----- Cheers, Sean -- View this message in context: http://forum.world.st/Why-was-asLegalSelector-removed-tp4806427.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
As you know, I love cleaning ;) But... stepharo wrote
https://github.com/pharo-project/pharo-workingRoadmaps/blob/master/StringCle...
What enlightenment am I supposed to gain from "candidates for removal... asLegalSelector", and later "Done: candidates for removal... asLegalSelector". I still understand nothing of the rationale. stepharo wrote
This code is bogus and shitty.
And useful ;) (as evidenced by this thread). Okay, it's limited, but what's better - having users roll their own every time? For now, I'll package it with my code, but I think we should add it back, maybe with a method comment to clarify that it creates a unary selector only... Bring back #asLegalSelector https://pharo.fogbugz.com/default.asp?14969 Fix in inbox: SLICE-Issue-14969-Bring-back-asLegalSelector-SeanDeNigris.1 ----- Cheers, Sean -- View this message in context: http://forum.world.st/Why-was-asLegalSelector-removed-tp4806427p4806671.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
Le 20/2/15 15:59, Sean P. DeNigris a écrit :
As you know, I love cleaning ;)
But...
stepharo wrote
https://github.com/pharo-project/pharo-workingRoadmaps/blob/master/StringCle... What enlightenment am I supposed to gain from "candidates for removal... asLegalSelector", and later "Done: candidates for removal... asLegalSelector". I still understand nothing of the rationale. Yes we are poor are documenting such decision. But if to remove a bad method it takes 5 times more energy than removing it then we will never make progress. This code is bogus and shitty. And useful ;) (as evidenced by this thread). Okay, it's limited, but what's better - having users roll their own every time?
Probably and I'm not provocating.
For now, I'll package it with my code, but I think we should add it back, maybe with a method comment to clarify that it creates a unary selector only...
Bring back #asLegalSelector https://pharo.fogbugz.com/default.asp?14969 Fix in inbox: SLICE-Issue-14969-Bring-back-asLegalSelector-SeanDeNigris.1
I think that this is better that you package it with your app. I do not see the point to have this method fromGarbageToUnarySelector in String. Stef
participants (2)
-
Sean P. DeNigris -
stepharo