On Tue, Nov 04, 2008 at 09:44:53PM +0100, Cyril ADRIAN wrote:
> Hi Paolo,
>
> On Tue, Nov 4, 2008 at 10:30 AM, Paolo Redaelli <
[hidden email]>wrote:
>
> > Also symbols like Greek letters (α,β,γ,δ,η,μ,φ) are widespread in
> > many scientific expressions and if allowed would make code more
> > readable than alpha,beta,gamma,delta, because expressions will be much
> > shorter without sacrificing understandability and readability of the
> > indended readers. I think that you will agree with me that SmartEiffel
> > source code is meant to be read by people and only after that compiled
> > by a computer....
Yes, there are characters that would be useful. But there are also
ambiguities. For one thing, Unicode has "combining" code-points, so
that several Unicode code-points combine to make one character. Some of
characters so build also have code points of their own. Should it
matter whether you type e-grave as an e and a grave or as one symbol?
Should the two versions be recognised as separate identifiers or as the
same identifier? It would be confusing either way.
Also, most languages in the world don't have a distinction between upper
and lower case. All the rules Smarteiffel seems to want to enforce
about which case of letters to use for which things would have to be
abandoned.
Finally, if all you want is to be able to used unicode in character
strings for printing, UTF-8 works fine, with no (or almost no) changes
to the smarteiffel imp0lementation. The UTF-8 encoding was designed to
make this easy. Just if you want to play games with individual
characters, you'd have use a little effort to tase them out.
Not to mention the Unicode tools in the Smarteiffel libraries. of
course.
-- hendrik
>
>
> Java has allowed it since the beginning. But I never saw anything written
> otherwise than with standard ASCII7 alphanum, except in comments. The
> reason, I guess, is twofold: (but then, maybe I'm biased)
> 1- our keyboards do not allow to easily input greek or in general non-ascii
> characters, so entering something that's not ascii is usually cumbersome.
> 2- anyway most people tend to write code in English; I do, because doing
> otherwise disrupts the thought process with complex inter-language
> translations.
>
> In countries with other alphabets than latin maybe inputting something in
> their own language may be more straightforward... But is Unicode widespread?
> Or other different "code pages"?
> At the office I currently work with Chinese people overseas, and even though
> I never saw their keyboards they seem to be able to enter ASCII characters
> quite easily. We share screens and work on code together, and the only
> latency is the network, not the typing speed.
I don't know about Chinese specifically, but I do know that for Japanese
there are so-called "input methids" that allow one to type a romaji
versin of the text (which follows specific conventions for Roman
alphabet versions of thousands of Japanese characters) and it makes
reasonable guesses as to the proper characters. Now Japanese has
homonyms (what language doesn't) and so there are frequently
alternatives to be chosen from. THe input methid makes a guess, and the
typist can press the space bar to have it switch to alternatives.
This actually seems to work.
>
> Well, I don't know if it is worth it... But I have no strong opinion either
> way.
>
> Just my 2 cents...
>
> Best regards,
> --
> Cyril ADRIAN -
http://www.cadrian.net/~cyril