With statement become like C#'s using?
Dicebot
public at dicebot.lv
Mon Aug 5 08:38:11 PDT 2013
On Monday, 5 August 2013 at 15:30:45 UTC, Bosak wrote:
> ...
What you propose is rather unwelcome for classes (destruction of
GC-managed objects is non-deterministic) and closest thing for
IDisposable D has is "destroy" which is not something that is
expected to be called silently.
However, I do like proposed extension of `with` syntax to allow
declarations. It perfectly matches `if` and allows to emulate C#
behavior via `scoped`. That will improve language consistency.
More information about the Digitalmars-d
mailing list