I also use 'with' extensively, despite the risks, since with the right usage the readablity gains are considerable.
2011/8/3 Max Vlasov <[email protected]>: > 1. Introducing a check in the compiler setting (or a conditional define) > that could force the developer to use self inside 'with' constructions. ... > 2. Some switch (maybe on by default) that prevents from compiling if there > are several duplicate names in the same 'with' context (including global, > local, fields). Error is IMHO too severe. I think a warning if the name inside of 'with' overrides a name from outer scope would be an acceptable compromise. Of course, a disambiguation facility would be even better, but I am afraid FPC developers will resist this improvement :( -- Alexander S. Klenin -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
