Andrei Alexandrescu 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/
Andrei
I'm unsure about this idea.
I don't know if it would be worthwhile, but I would say there are two
aspects that likely would need to be observed for this to work out
favorably:
* Having non-unicode versions of the symbols/keywords available in
Unicode, such that non-Uunicode editing and viewing is always possible
as a fallback. This has some important consequences though, such as
making Unicode-symbol-usage unable to solve the shortage of brackets
for, for example, the template instantiation syntax (because an
alternative ASCII notation would still be necessary).
* Having a way to directly input the Unicode symbols in the keyboard.
One reason is because of typing succinctness, and another, is because I
find the alternative (have the editor/IDE automatically change an ASCII
character sequence into a Unicode symbol) to have several disadvantages:
First is that it doesn't work outside the editors/IDEs configured to do
so, (which is a bummer, there is actually plenty of code written outside
that: newsgroups, articles, forums, bug reports, IRC, etc.). Second, I
personally like that the editor always require exactly N backspaces to
erase N typed characters[*].
So, anyone knows if it is possible on Windows (I believe in Unix it is)
to configure your keyboard mapping with custom settings? For example, if
I press AltGr-O, it inputs some Unicode character of my choosing?
[*] As a sidenote, this is also why I don't like having my editor
configured to insert 4 spaces on TAB-press. Unless, the editor is also
smart enough to delete the 4 spaces on one backspace/delete and move 4
spaces on one move cursor operation (arrow key press).
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D