Brad White wrote:
> m. Th. formulated on Thursday : >> We really need >> an 'using' keyword. Of course, imho. >> > What in the world for?? > > Whether you mean the VB or the C# incarnation, > Delphi already has that. > > IMHO, the C# 'using' was put in place to make > up for the lack in functionality that Delphi > already had. > > HTH, > Brad.
Aside the relationship between Delphi and .NET resource protection structures (thing which was discussed already), there is another thing which wasn't touched: code readability, code quality.
Mind you, can be many nested 'try' blocks and sometimes you must be careful what is handled/protected where.
Also, by using 'using' your intent is more clearer (to use locally a (usually) short-lived with auto-managed lifetime object) whereas 'try' has a much more general meaning.
my0.02c,
--
m. Th.
On the Wings of the Wind... http://wings-of-wind.com/