Good practice

Chris Pressey cpressey@REDACTED
Fri Jul 18 21:05:01 CEST 2003


On Sun, 8 Jun 2003 17:28:01 -0400 (EDT)
erlang@REDACTED wrote:

> bash$ erl
> Erlang (JAM) emulator version 47.4.1
> 
> Eshell V47.4.1  (abort with ^G)
> 1> c(test1file).
> ./test1file.erl:172: Warning: variable 'Response' exported from
> ['case']{ok,test1file}
> 2>    
> 
> 
> From the file in question:
> 
>       case checkvalid(Funcref, Correctlist) of
>         false ->
>           Response = false;
>         Other ->
>           Response = invoker(Other, Otherargs)
>       end,
>       Requester ! Response,  

I've never actually understood why this isn't a full-fledged error.

Is there a good reason that bindings are allowed to 'leak' out of a
case..end?

My language designer's intuition is telling me that the scoping rules
for case..end should be more like those for fun..end.

-Chris



More information about the erlang-questions mailing list