R = catch foo() ?

Luke Gorrie luke@REDACTED
Fri Mar 14 22:58:52 CET 2003


Shawn Pearce <spearce@REDACTED> writes:

> Why is this ok:
> 
> 	case catch foo() of
> 		R -> ....
> 	end.
> 
> and this is not?
> 
> 	R = catch foo(),
> 	....

Quirky parsing. You can write:

  R = (catch foo()),

A ways back I hacked the grammar (erl_parse.yrl) to allow the other
syntax, which looked reasonable I thought. I ran that copy for perhaps
6 months without noticing any troubles. Maybe there was something
lurking though..

-Luke




More information about the erlang-questions mailing list