[squeak-dev] Utilities' symbol mangling methods

Bert Freudenberg bert at freudenbergs.de
Mon Dec 2 10:16:12 UTC 2013


On 2013-11-30, at 01:00, Frank Shearar <frank.shearar at gmail.com> wrote:

> On 29 November 2013 23:50, tim Rowledge <tim at rowledge.org> wrote:
>> 
>> On 29-11-2013, at 3:38 PM, Frank Shearar <frank.shearar at gmail.com> wrote:
>> 
>>> On 29 November 2013 21:51, tim Rowledge <tim at rowledge.org> wrote:
>>>> 
>>>> On 29-11-2013, at 12:43 PM, Frank Shearar <frank.shearar at gmail.com> wrote:
>>>> 
>>>>> inherentSelectorForGetter
>>>> That’s absolutely a Symbol method and really ought always have been there.
>>> 
>>> It wasn't clear to me either from the senders-of or the implementation
>>> whether it should go on Symbol or String, so I went with the
>>> broader/safer option, and put it on String.
>>> 
>>> But I take it you're voting for "put it on the dang object" option
>>> rather than "monkey patching is evil”?
>> 
>> Guess so; methods ought to go in The Right Place. Now *defining* that place… that’s where the art is.
> 
> And so a method that takes a string/symbol and turns it into some
> slightly different symbol pretty much ought to go on String/Symbol.
> 
> I'm leaning heavily towards the monkey patch option, and not just
> because I have the work done waiting for committing. I'll hold off on
> anything for the moment though, both because it has a rather large
> number of changes to Etoys and to give others a chance to chime in.
> That it's midnight here, and I'm tired and hence not in the best shape
> to do dangerous things like commit changes has nothing at all to do
> with the waiting. Promise.
> 
> frank

Converting between setters and getters seems generally useful to me, so even if at the moment it may be only used in Etoys, I'd not make it an Etoys-specific extension.

- Bert -




More information about the Squeak-dev mailing list