Damien Pollet-2 wrote
> Indeed, there is much to say about the String API :)
> Thanks for mentioning this, I'm gathering missing behavior like this !

It seems unanimous that we should add these. I agree that they are useful in
some cases. However, strings are so general that IMHO there are infinite
such operations that we could add. Already "String methodDict size = 333",
and one can't depend on method protocols to sort things out because they are
hijacked for package extensions, so it's easy to be fooled by thinking "let
me check the converting protocol for that" and (maybe) finding out later
that you missed it because #asXyz is in *OtherPackage, which now forces you
to manually scroll through 333 methods to make sure your desired message
hasn't been implemented.

So I'm not saying "don't add them". I just want to have a conversation
about:
1. How often would these be needed? (We should have that conversation about
most of String's methods)
2. Do we have any plans for real protocols, with the concepts of privacy and
package extension extracted into other objects where they belong?
3. In the mean time, what is a reasonable cognitive limit for an API? For me
333 is way beyond comprehension with the current tooling, crippled somewhat
by #2.



-----
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/String-operations-tp4817803p4818540.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to