From: Yoshiki O. <Yos...@ac...> - 2004-04-07 05:57:20
|
Ned, At Tue, 6 Apr 2004 22:28:40 -0700, Ned Konz wrote: >=20 > On Tuesday 06 April 2004 8:40 pm, Yoshiki Ohshima wrote: > > =A0An extreme along this line is that we even don't need Character > > objects; we can make a string with length of 1 behave as if today's > > character. =A0After all, "a character cannot print itself" is the way > > Unicode is designed. =A0So, using Unicode is kind of a synonym of this > > approach. =A0(I wouldn't pursue this extreme in Squeak, though.) > > > > =A0 The other approach is to make a character self-contained thing. =A0= It > > knows how to print itself, etc. =A0To make this happen, a Character has > > to carry more than naked code-point and the higher bits in the word is > > where it goes. >=20 > But we already have this situation with the existing Characters. They don= 't=20 > know their encoding, so any attempt at printing them in an Inspector is v= ery=20 > possibly wrong (unless they're in the default encoding). What do you mean by "they don't know their encoding?" You mean that they don't know the font to use by default, etc.? For the first 256 chars, the default font simply *works*. For the other characters, this is not always the case. > How often do you find yourself inspecting individual Characters inside a = > String? >=20 > Even more to the point: how often do you find yourself inspecting Charact= ers=20 > that aren't inside a String? To which point? We should go with 24 bit immediate? We should go with "naked code point + attributes" approach? How often *I* inspect those is relevant here? I personally do it all the time, because I write and debug a part of Squeak that involves those objects. I guess you're saying that you like the *first* approach I wrote. Which isn't too different from my position. =20 > After all, a String could provide the required context to inspect its=20 > characters. How about the inspecting the string itself? -- Yoshiki |