[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mobile variables



Adrian Lawrence wrote:

> This is a slightly revised version. In my first experiment, CLAIM had two
> functions: to "grab"  exclusive rights to the variable(s); and to define
> a scope in which EREW usage rules apply. It was a variant on a PAR
> constructor. I then needed an extra keyword OWN to test ownership. By
> making CLAIM roughly equivalent to a function with side effects (I feel
> uncomfortable about that), no extra keyword is needed. The second
> function of the original CLAIM -- to delimit usage rule regions -- is
> now done by a "mobile abbreviation".
>
> 1) A mobile variable is declared in the usual way but with a prefix
>    MOBILE. This decoration informs the compiler that the
>    variable will be MOBILE at some point and allows separate compilation
>    of processes.
>    Example: INITIAL MOBILE [2]INT IS [1,2] :

Because 'mobile' variables are actually carefully-controlled shared variables,
wouldn't it be better to use the keyword SHARED thus:

INITIAL SHARED [2]INT IS [1,2] :

?
Rick
--
Richard Beton B.Sc. C.Phys. M.Inst.P.
Roke Manor Research Limited (http://www.roke.co.uk/)
--------- Standard Disclaimer about my own views etc etc --------
---------  My mail client accepts rich text (HTML) mail  --------
Welsh Highland Railway: http://www.whr.co.uk/WHR/WHR.html