Newsgroups: comp.sys.transputer
From: jbs@client41.comlab (Bryan Scattergood)
Subject: Re: OCCAM3 (was :- Revision of occam 2 Reference Manual)
Date: 13 Aug 1994 12:44:10 GMT
Message-ID: <JBS.94Aug13134411@client41.comlab>

> : >- RETURN from a PROC or FUNCTION... (dunno how to handle RETURNs in
> : >  a PAR.. maybe the compiler could restrict the use of RETURNs to
> : >  PROCs which don't have PARs..)
> 
> : I am not sure what you mean here. If you mean RETURN from the middle of
> : a function, then there is no functionality added to the language, just
> : confusion.
> 
> : Cheers,     Andy.
> 
> This reminds me another question. Why is it a implementation restriction
>  if you use a PAR construct inside a FUNCTION???
> 
> Kang Hsin Lu

I've always thought that the reason for this was fairly simple: functions
should be deterministic.  If you allow PAR inside a function (or indeed
any VALOF) then it may not be deterministic any more and lots of the
nice rewrite rules for occam stop working.

	Bryan Scattergood



