erlc question, why no error message for erronous code?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

erlc question, why no error message for erronous code?

Bengt Kleberg-3

> X-Authentication-Warning: enfield.sics.se: joe owned process doing -bs
> Date: Tue, 3 Jun 2003 13:15:33 +0200 (CEST)
> From: Joe Armstrong <joe>
> To: Bengt Kleberg <eleberg>


> But it's not an error.
>
>   catch (rate_class + 1)
>
> is well defined
>
> Now why anybody might want to write that is a mystery - but it it allowed
>
> (A warning might be better  - oh and a pragma to turn off the warning)
> then you could write
>
>    X = catch ( (yesIknowItlooksFunny) rate_class + 1)
>

yes, you are correct. i agree that a warning is the best solution. and
it would be perfectly ok (imho) to turn off the warning by a
compiler directive (thus not having to change the code).

but i sure would like that warning, please.


talking about warnings i would like the current erlc system (warnings
if the right compiler switch is on) changed to its opposite:
warnings, unless the right switch turns them off.
rationale: experienced programmers that want to break the rules can
turn warnings off. new programmers that need all the help they can get,
do not know enought to turn the warnings on.


bengt