Version française
Home     About     Download     Resources     Contact us    
Browse thread
ergonomie du compilateur
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ian T Zimmerman <itz@r...>
Subject: Re: ergonomie du compilateur

In article <199701211254.NAA13357@ithif18.inf.tu-dresden.de> Hendrik
Tews <tews@tcs.inf.tu-dresden.de> writes:

> 
> Hello,
> 
> I do occasionally program in ocaml. Since David Monniaux started a
> discussion about the error messages of the ocaml compiler I would
> like to add my opinion as well.
> 
> Features I dislike:
> 
> - There is no error recovery in the compiler. Before I start the
> first compile I have at least 5 syntax errors in the file. In order
> to find them I have to go through at least 5 edit-compile cycles,
> which I find very annoying.
> 
> - In case of a syntax error, the compiler never reports what it
> was expecting. For an ocaml beginner which has some experience in
> SML it can be a tough problem to find the error in a line like
> 
>     type 'a tree = node of 'a * 'a tree * 'a tree
> 		 | leaf;;
> 
> since the compiler only says
> 
>     File "a.ml", line 3, characters 13-14:
>     Syntax error
> 
> I would consider a message like "Expecting a Constructor, but found
> an identifier" extremely useful.
> 

I am working on these (among millions of other non-Caml things), in
the context of Caml Light.  If I ever finish it, I'll certainly
contact Ocaml maintainers about a possible port.

-- 
Ian T Zimmerman                        <itz@rahul.net>
I fully support the President's proposal to test driver's license
applicants for drugs.  Any plan to reduce driving is worth a try.