[Lazarus] 'with' is evil, isn't it?
Graeme Geldenhuys
graemeg.lists at gmail.com
Wed Aug 3 14:26:50 CEST 2011
On 08/03/2011 02:00 PM, Alexander Klenin wrote:
> 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;
A simple solution to something which I don't think is a problem either.
[I fully agree with Michael van Canneyt here]
Simply use a better IDE that can do code completion, identifier
completion or code prediction. If your IDE of choice doesn't cater for
this, speak to those developers or start submitting patches.
If every compiler must start adding hints, warnings or extra parameters
or languages features just because your can't type fast enough.... well,
than is your problem. Learn to type faster, or use a better IDE.
Object Pascal is quite clear on defining scope. So I really don't see an
issue with 'with' at all. If you don't like it, don't use it.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
More information about the Lazarus
mailing list