Sean Hinde sean.hinde@REDACTED
Mon Oct 27 15:25:43 CET 2003

On Monday, October 27, 2003, at 11:54  am, Robert Virding wrote:

> ----- Original Message -----
> From: "Luke Gorrie" <luke@REDACTED>
> To: "Richard Carlsson" <richardc@REDACTED>
> Cc: "Sean Hinde" <sean.hinde@REDACTED>; <erlang-questions@REDACTED>
> Sent: Tuesday, October 21, 2003 7:49 PM
> Subject: Re: Try/Cond
>> "Richard Carlsson" <richardc@REDACTED> writes:
>>> The current status is that it turned out that Erlang's scoping rules
>>> made it harder than we had expected to implement "cond" correctly
>>> (i.e., it's not just a trivial expansion into a nested case
>>> statement), so it was postponed until someone with a lot of spare 
>>> time
>>> could have another look at it.
>> Just add `let' too.
> I wish we had and I wish we would. It would remove an aweful lot of 
> scoping problems, not just in cond.
> Robert

This is quite an interesting case. The current situation from the dumb 
user perspective is that sometimes the compiler warns you that a 
variable is "unsafe", even though it seems illogical that its binding 
could escape from where the compiler is telling you it has. Never mind, 
just make up some new variable names and life goes on.

Introducing let into the language would force the requirement for an 
explicit understanding of what underlies these occasional error 
messages and the need to specifically code for it with new syntax onto 
anyone wishing to use the language or maintain applications written in 

I'd vote for a couple of extra compiler messages and the slight 
inconvenience the inelegant scoping causes if it means not adding let.


More information about the erlang-questions mailing list