June 10, 2013
On Mon, 10 Jun 2013 15:33:44 +0200
"Anthony Goins" <neontotem@gmail.com> wrote:
> 
> Am I the only one that found this useful?
> Is there a better way?
> 
> with (specificModule)
> {
>      result = ufcsChain.ambiguousFunction.link3();
> }

Ooh, that's another good one!
June 10, 2013
On Sunday, 9 June 2013 at 10:11:25 UTC, khurshid wrote:
> D language have like Pascal/Delphi  "with statement",  which very useful for writing readable code.
>
> http://dlang.org/statement.html#WithStatement
>
> Maybe I'm wrong, but, I never saw  where using this statement in phobos  source codes, what problem using this statement?
>
> Regards,
> Khurshid.

You're right but the with statment in Pascal/Delphi is deprecated. While it was usefull in a simple branch, it was error-prone. In "D" the scope() statement can be used to overcome the old Pascal pattern: with whatIcreate try finally free.

quote from Delphi XE4 release (technical pdf):
"4. OTHER LANGUAGE CHANGES
Besides string type changes and objects memory management, there are other current or
expected changes in the new Delphi ARM compiler that you can easily start to adopt:
  Sooner or later, the with statement is going to be deprecated and removed from the
Delphi language. You can easily start removing it now from your code, and most Delphi
developer will agree this is a good idea anyway, given some of the hidden pitfalls of this
keyword.
"
1 2 3
Next ›   Last »