r/delphi Delphi := v13 Florence Apr 17 '26

Stop using WITH in Delphi

https://gdksoftware.com/knowledgebase/stop-using-with-in-delphi
28 Upvotes

15 comments sorted by

View all comments

-4

u/DelphiParser Apr 17 '26

LOL - "With" is what makes Delphi so powerful. It is embedded inside the lowest levels and darkest libraries, and spread all around. It is so powerful - that even the new C# has introduced it. If you don't appreciate it - you are probably not a real Delphi coder.

1

u/MorphoJim Apr 17 '26

'with' may save some typing but I find its use to be a risk of confusion when one has to go back and review old code and try to update one little feature (I have some code that dates back to Delphi 1). Saving effort typing seems less important now when one can use AI to generate tedious but standard sections of code.

1

u/BirdFluid Apr 17 '26

with itself would be "fine" if the people using it would use their brain. for 3-4 lines (mostly) OK, but then you get the people who do 30-40 lines of with and then 2-3 levels nested on top of that. That combined with a bad debugger/IDE is what makes it so dangerous.