Unicode vs. Programming Languages

I really-really want to see a programming language, which allows using proper unicode symbols for operators.

I mean:

  • × instead of *
  • → instead of ->
  • ← instead if <-
  • ≠ instrad of !=
  • ≤ and ≥ instead of <= and >=

This list can be continued more and more…

I perfectly understand the roots of current situation and I don’t ask to use ONLY unicode-symbols, but I ask language-manufacturers to allow this.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • DZone
  • FriendFeed
  • Reddit
  • Tumblr
  • Twitter
  • Mgcci: such input is easily achieved using macro-expanders… such as TextExpander (on mac)

    I am sure there are similiar tools for other platforms
  • I would love this to happen.
    If I can input these things easily..
    Like every time I want a square root sign I have to go to online and search "square root UTF" to find it.
  • Finally, a use for all the keys on the space cadet keyboard! :D
  • Dominik del Bondio: user-definable operators are possible in Haskell (and I guess some other languages) too…

    I want to see that as a "native feature" (aliased to standard ascii-operators)
  • Here's an implementation for PHP6... Have fun with it!

    http://blog.libssh2.org/index.php?/archives/69-...
  • sounds like you are looking for Perl6 :)
  • I've got 10000 unicode symbol table here..
    http://kurapov.name/unicode/
  • Perl 6:
    http://dev.perl.org/perl6/faq.html:
    user-definable operators (from the full Unicode set)
    and http://dev.perl.org/perl6/doc/design/syn/S03.ht...

    ;)
  • endeveit
    Looks very unusual :)
    Maybe it is power of habit or inertness of thinking :D
  • Sebastian: that just means, that your font doesn't support that symbol… :)

    Unfortunately, a lot of windows-fonts have poor unicode-support.
  • Here you already see the problems, Unicode introduces: The replacement you want for "->" (an Arrow) renders as ">" on my computer that doesn't have a very exotic configuration: WinXP + Firefox (German version both)
  • hartmut:
    - typing unicode can be not-so-painful if OS gives a helping hand
    - auto replacement is a personal choice

    anyway, I think I made it clear, that both of these options (good'ol ascii and pretty unicode) should be supported by compilers/interpreters, imho.

    and non-unicode-aware editor is something I don't want to face (actually I am quite happy, that these days I can use unicode on mac, linux, freebsd, openbsd and solaris)

    and pretty-printing is a source of confusion… because whenever you read pretty-printed document and try to type it in, you get problems…
  • Jan
    @Regin Too many keys :p
  • hartmut
    - typing unicode -> no way

    - auto replacement -> i'd rather have "what you type is what you get"

    - pretty printing -> tools like a2ps have been supporting this for ages

    - and then there's the situation every once in a while where you have to modify code on a deployment system on which $EDITOR is not unicode aware yet ...
  • Hmmm... what about unicode keyboards?
  • endeveit: because it looks cool ;)

    a = 2;
    b = 30;
    с = {qq: 3, zz: 4}

    while (b ≥ a) {
    a ×= c→qq;
    }

    ↑b;
  • endeveit
    But what for?
    Could you tell in details?
  • Tobias: that's an easy part, as there are a lot of utilities which do such changes in any application (I know at least 2 such tools for mac and 1 such tool for windows)
  • Tobias Struckmeier
    Hehe and an IDE that automatically makes the replacement after you type the ascii combinations.
    Because I don't want to enter the unicode when writing one of those :)
blog comments powered by Disqus