Re: sub and superscripts

From: Gregg Reynolds (
Date: Fri Jul 01 2005 - 14:23:14 CDT

  • Next message: Gregg Reynolds: "Re: sub and superscripts"

    Peter Constable wrote:
    >> From:
    >> [] On Behalf Of Gregg Reynolds
    >> For programming language design it would be nice to have the entire
    >> Latin (ascii) and Greek repertoire available as subscript and
    >> superscript characters. So for example, using ^ to indicate
    >> superscript and _ to indicate subscript,
    >> i^foobar = i to the foobar power i_foobar = index foobar places
    >> into the array i
    > So, you expect lots of programmers to have to have input methods that
    > support a large set of sub-script characters for something as common
    > as array indices? So, instead of MyArray[i] one would use MyArrayᵢ?

    Yes. Of course, syntax is largely a matter of taste. But the
    motivation is to make a programming language syntax more like
    mathematical syntax. I doubt any mathematician would prefer MyArray[i]
    to MyArray with a subscript i. (Properly typeset, of course). My
    personal belief is that programming will eventually shift from
    procedural to funcional/constraint languages. It's a matter of
    expressiveness and conciseness. The holy grail is not natural language,
    but mathematical notation.

    Also, sub/superscripts can also be used in identifiers.

    As to editing, well, I would argue that Unicode is still in its infancy.
      I expect that somewhere over the next decade we will begin to see
    editors (and programming languages) that exploit Unicode more fully.
    Even today, it isn't very hard to adapt emacs to use Unicode
    mathematical (and other) symbols and to edit that sort of stuff quite



    This archive was generated by hypermail 2.1.5 : Fri Jul 01 2005 - 14:24:30 CDT