caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Warning messages and lonely variables
@ 2000-06-14 13:22 Nicolas barnier
  2000-06-16 13:55 ` Julian Assange
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas barnier @ 2000-06-14 13:22 UTC (permalink / raw)
  To: ocaml

Wouldn't it be judicious to warn the user whenever a variable appears in
the left hand-side of a (let/pattern-) binding and not used anymore in
the following code, like they do in Prolog (e.g. within the Eclipse
compiler) ? This is one of the source of many (of my) stupid bugs
(especially when modifying pieces of code) and surely a desirable
feature of a correct program. It seems also not
so intricate to check (from my naive user standpoint at least).

Cheers

-- Nicolas




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Warning messages and lonely variables
  2000-06-14 13:22 Warning messages and lonely variables Nicolas barnier
@ 2000-06-16 13:55 ` Julian Assange
  0 siblings, 0 replies; 2+ messages in thread
From: Julian Assange @ 2000-06-16 13:55 UTC (permalink / raw)
  To: Nicolas barnier; +Cc: ocaml, proff

Nicolas barnier <barnier@recherche.enac.fr> writes:

> Wouldn't it be judicious to warn the user whenever a variable appears in
> the left hand-side of a (let/pattern-) binding and not used anymore in
> the following code, like they do in Prolog (e.g. within the Eclipse
> compiler) ? This is one of the source of many (of my) stupid bugs
> (especially when modifying pieces of code) and surely a desirable
> feature of a correct program. It seems also not
> so intricate to check (from my naive user standpoint at least).

Yes, this has bitten me off several times already.

Similarly, code computed as unreachable in graph/flow analysis should
generate a warning.

Cheers,
Julian.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-06-16 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-14 13:22 Warning messages and lonely variables Nicolas barnier
2000-06-16 13:55 ` Julian Assange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).