lexer puzzle

John Meacham john at repetae.net
Fri Sep 26 01:16:55 EDT 2003


On Fri, Sep 26, 2003 at 08:59:12AM +0200, Ketil Z. Malde wrote:
> Brandon Michael Moore <brandon at its.caltech.edu> writes:
> 
> > Or was that supposed to be composition of a constructor with a function, A
> > . f? Function composition, and higher order functions in general are
> > likely to confuse an imperative programmer, but I think there isn't much
> > syntax can do there.
> 
> I think there is a problem with too much overloaded syntax.  Perhaps
> it is time to put non-ASCII characters to good use?
> 
> For instance, function composition could use the degree sign: ° 
> and leave the . for module qualification.

why not the actual functional composition operator: · or ∘

we could also make good use of ∀ ∃ ⇒ ← ∧ ∨  and all the other fun
mathematical operators.

> 
> Template Haskell could use double-angle quotation marks: «  »  
> and the section sign: §
> and avoid clashing with list comprehensions and the function
> application operator. 
> 
> Implicit parameters could use an inverted question mark: ¿
> 
> And so on, just look for places where the semantics depend on spaces
> in the right (or wrong) place.

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.

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

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john at foo.net
---------------------------------------------------------------------------


More information about the Haskell-Cafe mailing list