[ENH][CLEANUP][FIX] Renaming AbstractString and String

Andreas Raab andreas.raab at gmx.de
Mon Apr 11 04:11:57 UTC 2005


Folks -

Attached is an attempt at renaming the whole rename game. The SAR 
includes a number of change sets the first two of which are entirely 
optional (I just happened to use them when I built this stuff), the next 
four are merely refactorings and can be applied with no dangerous side 
effects whatsoever and the last three do the real thing. Just installing 
the SAR should work fine, here's what you get:

Optional Change Sets
####################

DisplayUndefined.cs
-------------------
Change the display of undefined characters from a question mark to a 
\uXYZ format. E.g., instead of

	Character value: 500 -> $?
	Character value: 500 -> $\u1F4

StringRefs.cs
-------------
Add some support for browsing the (non-trivial) references to String. 
For finding those execute:
	String browseNonTrivialStringRefs.
In my current image those are 23 compared to 721 (mostly trivial) 
references to String itself.

Safe Change Sets (pre-rename)
#############################

MacToSqueakAndBack.cs
---------------------
The current implementations and uses of #squeakToIso and #isoToSqueak 
are broken. They still assume that the internal encoding of Squeak is 
MacRoman (which it no longer is) and will therefore cause problems when 
clients still use these methods.

This change set acknowledges the changed realities by making isoToSqueak 
and squeakToIso no-ops and rather introduce macToSqueak and squeakToMac 
(which, under the old regime, would have been the no-ops).

UnifyMultiChar.cs
-----------------
This change sets obsoletes MultiCharacter by folding it with Character. 
Note that it does not remove MultiCharacter itself since this needs to 
be done so that all instances are converted to regular characters before 
we remove it.

InternalCleanup.cs
------------------
Internal cleanup for AbstractString, String, and MultiString.
Things done:
* Remove all #subclassResponsibilities and instead provide (unoptimized) 
implementations. The responsibilities clearly *do* lie with the common 
superclass - [Byte]String and MultiString may contain optimizations but 
that's about it.

* Push everything up as far as possible and unify some of the 
idiosyncratic differences.

Statistics:
- 13 methods NEW
- 39 methods MODIFIED
- 71 methods REMOVED

ExternalCleanup.cs
------------------
Various cleanups in external references to string. All of these have 
been replaced by either isString, isByteString or isMultiByteString.

Rename Change Sets
##################

MarkByteString.cs
-----------------
Mark those places that need to be changed to ByteString.

RenameString.cs
---------------
This change set finally renames
	String -> ByteString
	AbstractString -> String
and fixes those places that need to be fixed.

BinaryStorageFixes.cs
---------------------
Some last touches to make loading strings from binary files work correctly.

Cheers,
   - Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RenameString.sar
Type: application/octet-stream
Size: 48927 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050410/9e97758f/RenameString.obj


More information about the Squeak-dev mailing list