On Wed, Aug 3, 2011 at 22:34, Michael Van Canneyt <[email protected]> wrote: > >> Of course, a disambiguation facility would be even better, >> but I am afraid FPC developers will resist this improvement :( > > Frankly, I don't understand the discussion. > I use 'with' all the time because it increases readability and reduces > typing.
Agreed. > I don't want to be punished with heaps of warnings simply because I use a > language feature. Yes, I am aware that there are risks involved. This is why I suggested to restrict warnings only to a cases where actual ambiguity exists, which is actually quite rare. Maybe even warning is too much, and it should be a hint. Anyway, my preferred solution would be to allow aliases in 'with' statement, which would improve readability even further while sacrificing only a few characters: with a := MyCompomentList[0] do begin Rectangle(0, 0, a.Width, a.Height); end; No chance of ambiguity at all. -- Alexander S. Klenin -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
