Neat trick - 'with' and unnamed objects + 'with' proposals

Max Samukha samukha at voliacable.com
Tue Apr 24 06:45:17 PDT 2007


On Tue, 24 Apr 2007 22:03:07 +0900, Bill Baxter
<dnewsgroup at billbaxter.com> wrote:

>Denis Golovan wrote:
>>> Or perhaps analogous to how constructors are called 'this()' and have a
>>> 'this' pointer, we'd have a 'with' pointer so that the meaning of 'this' 
>>> in a class wouldn't be shadowed:
>> 
>>   +1. That feature is useful sometimes.
>
>You say "is" as if it exists in some other language that you've used? 
>Does it? And if so what's the syntax?
>
>--bb
Object initializers in C# 3.0 seem to do a similar thing but they
don't provide a way to call global (and local, I guess) functions with
'this'.
http://community.bartdesmet.net/blogs/bart/archive/2006/12/04/C_2300_-3.0-Feature-Focus-_2D00_-Part-2-_2D00_-Object-Initializers.aspx



More information about the Digitalmars-d mailing list