lexer puzzle

Ketil Z. Malde ketil at ii.uib.no
Fri Sep 26 10:56:40 EDT 2003


John Meacham <john at repetae.net> writes:

>> For instance, function composition could use the degree sign: ° 
>> and leave the . for module qualification.

> why not the actual functional composition operator: · or ?

Because: a) I've always used a small circle, the centered dot is for
(dot) products. I guess this is just a matter of mathematical
dialects.  And
        b) I didn't find it :-)
-------------- next part --------------

> we could also make good use of $B"O(B $B"P(B $B"M(B $B"+(B $B"J(B $B"K(B  and all the other fun
> mathematical operators.

Cool!  However, I think most/some current tools use ISO-8859(-1 or
whatever) input, and for legacy reasons it may be a good idea to stick
to symbols in that (those) subset(s).

As you may have noticed, I suggested mostly these symbols for
the language extensions, keeping H98 in 7 bits may or may not be a
priority.  At any rate, extensions could probably more easily
disregrard legacy.

> I would love to be able to use unicode to make my programs more
> readable. just as an alternate syntax for awkward ascii constructs.
> and as operator, function names when they make sense.

Another thing; it should be possible to have (X)Emacs use display the
glyphs you mention ($B"O(B $B"P(B $B"M(B $B"+(B $B"J(B $B"K(B) instead of the underlying
multigraphs. 

> this could probably be done with a preprocessor, but wolud be easier in
> the compiler to work out the layout rule and handle language extensions
> and whatnot.

Layout may be a problem.  Not for type signatures, though.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list