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

From: Richard Cobbe (cobbe at ccs.neu.edu)
Date: Tue Jun 5 11:08:08 EDT 2007

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.)

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.)


Posted on the users mailing list.