Escape analysis

Michel Fortin michel.fortin at michelf.com
Mon Oct 27 18:02:31 PDT 2008


On 2008-10-27 18:15:24 -0400, Walter Bright <newshound1 at digitalmars.com> said:

> That argues that "noscope" should be the default. Using "scope" would 
> be an optional optimization.

I don't think you have much choice. Take these examples:

	scope(int*)* a; // noscope pointer to a scope pointer.

	noscope(int*)* b; // scope pointer to a noscope pointer.

Only one of these two makes sense.

 - - -

On the other side, you could make a different syntax for scope than for 
const and shared, and then the noscope could be the default:

	int*scope* b; // scope pointer to a noscope pointer.

But that looks as attractive as const in C++.

 - - -

Hum, and please find a better name than "noscope".

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




More information about the Digitalmars-d mailing list