in reply to Perl 6 and Unicode Operators

On the one hand, I'd say what's the point of having Unicode if we don't use it? I would say the mathematical set class would be the intended use of unicode almost! Plus, most people who will use the Set class will have mathematical training, one would think, and that would be the reason they are using the set class, so I would think it would be a good thing!

On the other hand, I don't think my CLI can read unicode, and I tend to program in vi, so I could see how it'd be a bad thing too.

    -Bryan

Replies are listed 'Best First'.
Re^2: Perl 6 and Unicode Operators
by theorbtwo (Prior) on Jun 01, 2005 at 01:43 UTC

    Depending on some variables, that may not be hard to fix. What is hard to fix is creating easy ways to input the chars. On my keyboard, even something as simple as << and >> requires three keys for the unicode version, but only two for the ascii version. (Compose + < + < = «). Not only that, but I have to explicitly enable my compose key.

    Almost paradoxically, it is much harder to enable unicode in something like PM, as the orignal poster discovered, and as I discovered when I hit preview on this node.


    Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      This is very true. I was actually thinking about the << problem the other day. I'm almost positive I can set up vi to automatically replace << with «, and I would bet that other major editors would be able to do the same. But yes, the problem comes when you add unicode characters, and suddenly I would have to add more substitutions to my vim files.

          -Bryan

        With vi, you can press C-k key key to do a compose action -- C-k < < is «. However, this is still a lot more keys then <<, which works just as well.


        Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).