[plt-scheme] UTF-8 source code (was: Fun with paren-shape)

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Tue Jun 5 12:05:37 EDT 2007

On 6/5/07, Richard Cobbe <cobbe at ccs.neu.edu> wrote:
> On Tue, Jun 05, 2007 at 09:40:00AM -0500, Robby Findler wrote:
> >  Did you consider using utf-8? You can write something like this:
> >
> >  [ n ∈ nat : (< n 10) ]
> >
> >  where "nat" and maybe a few other things are builtins or from some
> >  extensible generator set. Indeed, you could probably use the usual
> >  natural number sign.
> As someone who's reading this code, that's great -- clear, concise, and
> consistent with tradition.
> But as someone who might want to write an expression like this, I'm put off
> by how hard it is to type "∈" and other super-ASCII characters on most
> systems.  (This is a problem not with DrScheme but with the underlying OS
> and its UI.)

FWIW, the Rodin tool for formal specification development in the
Event-B language based on Eclipse does exactly this. Is converts in to
the \in character, NAT to the IN symbol, -> to the partial function
arrow etc. However, this in scheme may not be convenient since you may
want to have a variable called in or with a name with in prefix. It
would definitely not be good to have the system substitute in by the
correspondent symbol.

I think it is not worth it to had these things to DrScheme. Lambda is
I think, a special case because you use it a lot and it is a special
symbol for the Scheme community that you like to see in your code...
but I remember that there was a delta for define and for some reason I
never felt like using it... Things like unicode symbols for shorthands
in my opinion only clutter the interface. I think there are more
urgent features to be added to DrScheme. :-)

> The only ways to type super-ASCII chars that I know of on OS X either
> require cluttering up my screen with the Character Palette window and using
> the mouse, or looking up the Unicode number for the desired character and
> hitting 5 or 6 keys to produce one character.  I find both input methods
> inconvenient enough that I prefer to use to use other, potentially more
> verbose but easier to type, syntax.  Is there an easier alternative?
> (I keep meaning to create a custom OS X keyboard layout that contains a lot
> of the mathematical symbols that I use on a regular basis, so you could
> hit, e.g., opt-e for element-of, and opt-h or something for turnstile, and
> so on.  Unfortunately, doing a keyboard layout is a fair amount of work,
> and it just hasn't made it to the top of my priority queue yet.)
> Richard
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Paulo Jorge Matos - pocm at soton.ac.uk
PhD Student @ ECS
University of Southampton, UK

Posted on the users mailing list.