On Thu, 31 Dec 2009, Adrian Kuhn wrote:

> <csra...@...> writes:
>
>> This brings to the forum an interesting debate!  Clearly Levente's solution
>> is the String redirection for Lukas' solution.
>>
>> Do this method eases programming for newcomers? Or it creates burden as
>> presented in Stan's posting?
>>
>> AK is IIUC very knowledgeable of tools used in Squeak/Pharo and even though,
>> had difficulty to find this
>> particular method!!
>
> Good point!
>
> To replace parts of a string, I want to send a message to the string not to 
> the
> regex. So without doubt, string should understand such a messages. (I dont
> know to which posting of Stan you're referring though).
>
> Also, I would expect short message names for common operations. Alas none of
>
>    #copyWithRegex:matchesReplacedWith:
>    #asRegex + #copy:replacingMatchesWith:
>    #copyReplaceAll:with:
>
> is particular short. And to make things words, none of these shows up when 
> auto
> completing #repl... because they all start with copy. Plus strings are nested
> in such a deep hierarchy that reading all understood messages won't scale.
>
> Personally, I would love to have a #gsub:with: on String. It is short and uses
> established vocabulary.

Please no, smalltalk is not awk or ruby and noone should expect that 
these cryptic function names are well known. Message names should be 
as descriptive as possible, this enables understanding the code without 
documentation. Short message names have no advantage, we are not in the 
80's.


Levente

>
> --AA
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to