November 28, 2005
Can the following statements be valid?

Foo foo;
foo.setData(
with(new SomeObj(Arguments))
{
// some init to SomeObj
} // end of with
); // end of setData


November 28, 2005
Shawn Liu wrote:
> Can the following statements be valid?
> 
> Foo foo;
> foo.setData( with(new SomeObj(Arguments))
> {
> // some init to SomeObj
> } // end of with
> ); // end of setData
> 
> 

Actually I was thinking of asking Walter to make any with statements which are passed a null reference to be skipped, as this would simplify the many times we check for null before setting members:

a = getResource();
if ( a is null ) return;
with(a) { ... lotsa stuff here ... }

becomes

with( getResource() )
{
..stuff here..
}

but that may be 'semantic overloading' taken too far, hehe.

-DavidM