Login  Register

Re: Character>>asCharacter ?

Posted by Blair McGlashan-3 on Nov 09, 2004; 7:36pm
URL: https://forum.world.st/Character-asCharacter-tp3372010p3372038.html

"Chris Uppal" <[hidden email]> wrote in message
news:[hidden email]...
> Is there any reason why there's no Character>>asCharacter method even
> though
> there is an Integer>>asCharacter ?
>
> An oversight, or would it be ideologically unsound ?

The latter. Integer>>asCharacter is unsound, and not just ideologically;
there is an infinite range of Integer's for which the conversion does not
make sense, and of course Integers and characters are only equivalent if one
thinks in 'C', they certainly don't meet the criteria of supporting
compatible protocols. So we would rather not have included
Integer>>asCharacter either, but as I recall it was in Smalltalk-80 so we
added it for the sake of compatibility.

Regards

Blair