Hi, thanks for the feedback. So it depends on which definition we will follow...
After investigating a little bit more I guess the current implementation is more valuable and should stay. For instance we can easily convert an ivar name into a class name with it: 'ellipseMorph' capitalized -> 'EllipseMorph' Also then this is in alignment with other dialects. Additionally: changing it would break too many things because it is often used in some #perform: based meta-magic and other (see SpecPreDebugWindow>>createNotifierPaneWidgets for an example) Sorry for the noise. I should upload a slice to Wikipedia + GitHub ;) Bye T. > Gesendet: Mittwoch, 15. März 2017 um 14:30 Uhr > Von: "John Brant" <[email protected]> > An: [email protected] > Betreff: Re: [Pharo-dev] Capitalized > > On 03/15/2017 05:33 AM, Torsten Bergmann wrote: > > According to https://en.wikipedia.org/wiki/Capitalization > > > > to "capitalize" is writing a word with its first letter as a capital letter > > (upper-case letter) > > AND THE REMAINING LETTERS IN LOWER CASE writing systems. > > > > So > > > > 'SOMETHING' capitalized > > > > currently returns "SOMETHING" in Pharo but should return "Something" > > according to the definition to end up with lowercase. > > If we fix this I guess we would also align Pharo with other languages, like > > C# for example [1]. > > That wouldn't be what I would expect. Here's what dictionary.com has for > capitalize: > > 1. to write or print in capital letters letters or > with an initial capital letter > > That definition doesn't say what happens with the rest of the letters. > > As for C#, isn't that someone's extension method for String and not a > Microsoft method? I don't see that method on Microsoft's current String > class documentation: > > https://msdn.microsoft.com/en-us/library/system.string(v=vs.110).aspx > > Also, the Uncapitalize method is inconsistent with the Capitalize > method. The Uncapitalize method changes only the first character and all > other characters are unchanged. However, the Capitalize method can > change all characters. > > Finally, Dolphin Smalltalk has an implementation that is similar to Pharo's: > > https://github.com/dolphinsmalltalk/Dolphin/blob/master/Core/Object%20Arts/Dolphin/Base/String.cls > > > John Brant > >
