[erlang-questions] How about a new warning? Was: Re: trouble with erlang or erlang is a ghetto

Richard O'Keefe <>
Tue Aug 2 07:59:50 CEST 2011


The basic misunderstanding here is that I was describing one
desirable instance of a style warnings facility that does not
yet exist.  I was not supposing or implying that any means of
selectively {en,dis}abling warning exists.  That was not the
focus of my attention.  I assumed for the purpose of argument
something like the $SET <check> ... $RESET <check> $POP <check>
facility found in 40-year-old Burroughs compilers for Algol,
Fortran, COBOL, BASIC et al or the similar age (*$+I*) (*$-R*)
check switches found in many Pascal compilers, not any sort of
function annotation scheme.

That's not to say that a function annotation scheme (perhaps not
entirely unlike the one found in Ciao Prolog) might not be a good
thing, just that at this stage of the conversation, it's more
useful to focus on

 1. Do we want lint-like checks for Erlang at all?
 2. Is matching against an already-bound variable a check we want?
 3. What are some other checks we might have a use for?

The SmallLint checks found in the Refactoring Browser for Smalltalk
contain many examples of such checks, most of which don't apply to
Erlang, although being able to check for consistency in the spelling
of function and variable names is rather nice.   Here's one that
makes sense for Erlang:

	if G1 -> S1, S
	 ; G2 -> S2, S
	...
	end

could have been

	if G1 -> S1
	 ; G2 -> S2
	...
	end,
	S





More information about the erlang-questions mailing list