Escape analysis (full scope analysis proposal)

Michel Fortin michel.fortin at michelf.com
Thu Oct 30 18:01:28 PDT 2008


On 2008-10-30 14:07:42 -0400, "Robert Jacques" <sandford at jhu.edu> said:

> On Wed, 29 Oct 2008 07:28:55 -0400, Michel Fortin  
> <michel.fortin at michelf.com> wrote:
> 
>> P.P.S.: This syntax doesn't fit very well with the current  
>> scope(success/failure/exit) feature.
> How about o.scope instead of scope(o)? Also, this would allow  
> contract-like syntax:
> void foo (myObject o, int* i)
>   if (o.scope <= i.scope) {
> ...
> }

Hum, but can that syntax guarenty a reference to o or i won't escape 
the current function's scope, like

	void foo(scope Object o);

?

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list