An inconvenient truth

Benji Smith dlanguage at benjismith.net
Wed Oct 8 09:26:07 PDT 2008


Benji Smith wrote:
> Andrei Alexandrescu wrote:
>> Unicode characters would be great and quite innovative. My personal 
>> choice is the chevrons Foo«Bar» which are easily distinguished 
>> visually from ASCII symbols and also easy on the eyes. But I never 
>> thought of it as an either-or choice, only as an alternate. I mean, 
>> requiring special editor support or typing Alt+171 whenever it comes 
>> about templates will do nothing in their favor. So an ASCII-only 
>> syntax that's also palatable is a must.
> 
> The chevrons would be very cool. Visually, they're my favorite option.
> 
>> All editors I tried in both Unix and Windows displayed the chevrons 
>> properly (beautifully in fact). Even command-line programs such as 
>> less and cat had no problem. Could people try the chevrons with 
>> various editors and report their experience here?
> 
> I use TextPad on Windows to edit all my D files. It doesn't handle UTF-8 
> at all, unfortunately. It'll display the chevrons just fine, but it 
> saves them as extended ASCII (byte values: 174 & 175) rather than as 
> UTF-8 digraphs. Consequently, DMD rejects the source file.
> 
> Hmmmmm. I really ought to switch to a different text editor. Lacking 
> good unicode support is really just inexcusable these days.
> 
> --benji

Oh, also, I do about 50% of my work on a laptop keyboard, with no 
separate number pad. The number lock button is a second-class citizen 
(invoked with the function key and scroll-lock), and the ALT-171 trick 
won't work with the top-of-keyboard numbers; only the numpad numbers.

So, on this device, it takes a minimum of twelve keystrokes for me to 
type a pair of chevron characters and then switch back to normal 
keyboard mode:

    FUNCTION
    SCROLL LOCK
    ALT
       j   (keypad: 1)
       7   (keypad: 7)
       u   (keypad: 4)
    ALT
       j   (keypad: 1)
       7   (keypad: 7)
       i   (keypad: 5)
    FUNCTION
    SCROLL LOCK

I think the chevrons are very cool, but there's just no way I'm willing 
to use them on a regular basis. They're too inconvenient to type.

--benji



More information about the Digitalmars-d mailing list