help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Unicode character special syntax


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Unicode character special syntax
Date: Fri, 21 Jul 2006 06:42:27 +0200
User-agent: Thunderbird 1.5.0.4 (Macintosh/20060530)

Mike Anderson wrote:
I know I should have spoken up earlier, but I am a bit disappointed
about the special syntax for Unicode character constants.
Nothing's set in stone.
My feeling is that much of the beauty of Smalltalk comes from the fact
that it has very little in the way of syntax. Also, is it compatible
with other Smalltalk dialects?
No, but it took me about twenty minutes to implement it in the RBParser which is what many other Smalltalk dialects also use. I will post a message to comp.lang.smalltalk asking for advice.

I don't know the status of Unicode implementation in VW, Squeak, etc. At least for Squeak, they have a non-Unicode implementation of multilingualization, because it was written by a Japanese guy and they are usually unhappy about Han unification (sharing the same code points between Chinese, Japanese and Korean characters).
"258 asCharacter" would be, at least potentially.
Yes, you are right. And indeed I was tempted to have "258 asCharacter" resolved at compile-time instead of having $<258>. On the other hand I think that the problem in Smalltalk comes from the fact that it has *a lot* in the way of terseness (paraphrasing your sentence above): I liked the similarity between $<16r102> and <U+0102> (which is how the Unicode guys refer to the same character), and I think it is innatural to refer to a character as a conversion. In almost every other language you can write something like '\u0102': it happens rarely, but it can be very useful.

I must say that I've often found "$ " to be completely unreadable, to the point that I'd write "Character space" instead. So one could repeat the same discussion and say that the whole syntax for character literals is useless, because you could write "'X' first" or possibly "'X' asCharacter" instead. In any way, character literal syntax leaves something to be desired.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]