Vote UpVote

Delphi: you should avoid the `with` statement as it makes your code less future proof

The Wiert Corner – As I wrote before, I’m with the Delphi with haters camp, and this is why: Using the with statement in Delphi makes your code less future proof. The below code example is just one of many. I show it because I recently bumped into doing some long overdue code porting to Delphi XE3. Since I’ve been bitten by Example code where FIConData is of type NOTIFYICONDATAW that used to compile fine: with FIconData do begin cbSize := SizeOf(FIconData); Wnd := Self.Handle; uID := $DEDB; uFlags := NIF_MESSAGE or NIF_ICON or NIF_TIP; hIcon := ...
Favorite? Off-Topic? jpluimers @ 2013-03-27 06:00


Visits: 953
Votes: 4
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Michael Riley
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)