[Pharo-project] About String empty and others

Stéphane Ducasse stephane.ducasse at inria.fr
Sat Feb 13 06:06:31 EST 2010


Hi guys

chris mueller proposed in squeak to have


Exception>>messageText
       "Return an exception's message text."
+       ^ messageText ifNil: [ String empty ]!
-
-       ^messageText!

- Added Array class>>#empty and String class>>#empty to provide applications with 
canonicalized instances of these oft-used objects; since they are embedded as literals in the 
CompiledMethod.

=============== Diff against Collections-ar.304 ===============

Item was added:
+ ----- Method: Array class>>empty (in category 'instance creation') -----
+ empty
+       "A canonicalized empty Array instance."
+       ^ #()!

Item was added:
+ ----- Method: String class>>empty (in category 'instance creation') -----
+ empty
+       "A canonicalized empty String instance."
+       ^ ''!

Item was removed:
- ----- Method: String>>asDefaultDecodedString (in category 'converting') -----
- asDefaultDecodedString
-
-       ^ self


http://code.google.com/p/pharo/issues/detail?id=1961



More information about the Pharo-dev mailing list