R = catch foo() ?

Luke Gorrie <>
Fri Mar 14 22:58:52 CET 2003


Shawn Pearce <> 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