Enhanced type guard syntax]

Chris Pressey cpressey@REDACTED
Sat Sep 20 21:25:44 CEST 2003

On 19 Sep 2003 15:53:06 -0500
"Martin J. Logan" <mlogan@REDACTED> wrote:

> On Thu, 2003-09-18 at 17:24, Chris Pressey wrote:
> > A much nicer world would be:
> > 
> > 1) the programmer writes whatever code they want in the "when" test
> > 2) the compiler analyzes that code
> > 3) whatever parts of it that have side-effects are rejected
> How could this be done at compile time while still using run time
> function call binding?
> If I say erlc modfoo.erl and it uses a guard that references code in
> modbar.erl  erlc must be made aware of modbar.erl so it can look for a
> "!" in that module. 

Well I never said it would be easy :)  The really tricky part is when
modbar.erl undergoes hot code upgrade.

But even if the functions in a guard were restricted to the current
module, I think it'd be a win for expressivity.


More information about the erlang-questions mailing list