UTF8 methods and portability

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UTF8 methods and portability

K. K. Subramaniam
Hi,

The methods named squeakToUTF8 appears regressive in the light of forks and
variants of Squeak and Smalltalk.

Is there any specific reason against calling it asUTF8" and so on? The methods
are not widely used yet to deserve leaving them in the image with a deprecated
flag.

Is there any idiomatic way to bulk rename a method (implementation and
senders) in an image? Doing a search and replace is tediously slow.

TIA .. Subbu


Reply | Threaded
Open this post in threaded view
|

Re: UTF8 methods and portability

Levente Uzonyi-2
On Wed, 30 Dec 2009, K. K. Subramaniam wrote:

> Hi,
>
> The methods named squeakToUTF8 appears regressive in the light of forks and
> variants of Squeak and Smalltalk.
>
> Is there any specific reason against calling it asUTF8" and so on? The methods
> are not widely used yet to deserve leaving them in the image with a deprecated
> flag.

String >> #squeakToUtf8 has 'ar 6/3/2007' timestamp in my image, which
means it's not that new (it's also included in the 3.10.2 release).
This method (as it's name suggests) converts a String from squeak's
internal representation to utf-8. Similar methods are #squeakToIso,
#squeakToMac, #utf8ToIso, etc.
#asUtf8 would be ok if strings knew their encoding, but they don't.

>
> Is there any idiomatic way to bulk rename a method (implementation and
> senders) in an image? Doing a search and replace is tediously slow.
>

OmniBrowser has tools for these kind of refactorings (ParseTreeRewriter).


Levente

> TIA .. Subbu
>
>
>