Adding Unicode operators to D

Don nospam at nospam.com.au
Thu Oct 23 00:36:39 PDT 2008


Bill Baxter wrote:
> On Thu, Oct 23, 2008 at 7:27 AM, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>> Please vote up before the haters take it down, and discuss:
>>
>> http://www.reddit.com/r/programming/comments/78rjk/allowing_unicode_operators_in_d_similarly_to/
>>
> 
> (My comment cross posted here from reddit)
> 
> I think the right way to do it is not to make everything Unicode. All
> the pressure on the existing symbols would be dramatically relieved by
> the addition of just a handful of new symbols.
> 
> The truth is keyboards aren't very good for inputting Unicode. That
> isn't likely to change. Yes they've dealt with the problem in Asian
> languages by using IMEs but in my opinion IMEs are horrible to use.
> 
> Some people seem to argue it's a waste to go to Unicode only for a few
> symbols. If you're going to go Unicode, you should go whole hog. I'd
> argue the exact opposite. If you're going to go Unicode, it should be
> done in moderation. Use as little Unicode as necessary and no more.

I agree.
There is in fact a fairly defensible subset of Unicode: those characters 
which are easy to type on some keyboard.  This would includes chevrons, 
currency symbols (especially pound, euro, yen); european accented 
characters (not terribly useful) and a couple of other punctuation 
marks. After all, if it's painful to type a Euro symbol on your 
keyboard, you're heading for oblivion.

The list is pretty much equivalent to the US-International keyboard 
layout in  Windows. There aren't many useful characters in there, but it 
might be enough.

« » ¿ ¡ ¶ § ¬ × ÷ ¤ £ ¥ € ¢ © ®

The chevrons and the inverted ? and ! are perhaps the most interesting, 
since they are paired. The multiply sign isn't bad, though.
With the German keyboards I have to use, some of these are less painful 
to type than {}.


More information about the Digitalmars-d-announce mailing list