character syntax

D. Tweed
Fri, 8 Feb 2002 07:57:00 +0000 (GMT)

On 7 Feb 2002, Ian Zimmerman wrote:

> itz> All this taken together, I mean, _really_, is the lexical
> itz> structure of Haskell a botch, or what?
> Jon> No. Innovative. All the problems described in this thread reflect
> Jon> unwarranted assumptions inherited in emacs. It's plainly possible
> Jon> to parse Haskell, and not hard either.
> First, parsing of a complete program (eg. by a compiler) is quite
> different from parsing a buffer that is being edited by a human.  The
> latter is hard, even for fairly well-specified languages.
> Irregularities only make it harder.

Just to show that an opposite point of view is possible: I've recently
being thinking about trying to use an ML dialect as part of some
interlanguage-prototyping that I'd like to do, since it seems easier to
find descriptions of interfacing into it from outside that seem
comprehensible to me. I originally learned ML before Haskell, and I
imagine that after a little while relearning things aren't lazy and that
I shouldn't curry functions unless I need to I'd probably get back into
it. But every time I look at it I just get put off by the (IMO) truly
awful syntax which is both verbose and seems designed for machine
parsing to the detriment of easy human understandability (e.g., ~ for 
unary minus and the #'c' character literal syntax and those damned
end's for terminating let-in constructions). And this is
quite important to me because I spend a lot of time reading and thinking
about code (particularly paper printouts) and not that much time doing
clever emacs searches. I will probably try again to get back into ML, but
it will be whilst suppressing feelings of frustration about the syntax.

> Second, this argument would be easier to accept if there in fact were
> an equally innovative tool capable of providing all the editing
> goodies Emacs normally does, for Haskell.  But I don't know of one,
> even now, 10 years or so after Haskell's birth.

That may be more indicative of the fact that few people in the community
find writing editing modes to be interesting things to do, and that emacs
is still using parsing tricks that made sense when people were editing on
slow, time-shared machines but not when the typical desktop machine is at
least a 200MHz pentium. There was recently a PhD position advertised
on the list in the area of refactoring functional programs; I'd be
surprised if whoever does that doesn't eventually end up with a GUI
(whether inherited from somewhere else or written as part of the project).

___cheers,_dave_________________________________________________________|`...heat generated by its microprocessors will|slope upward exponentially, reaching the power
work tel:(0117) 954-5250 |density of a nuclear reactor before 2010'-Intel