[Lazarus] Syntax highlighting anomalies

Alexander Klenin klenin at gmail.com
Sat Oct 9 08:51:59 CEST 2010


On Sat, Oct 9, 2010 at 14:24, Hans-Peter Diettrich <DrDiettrich1 at aol.com> wrote:
>> break, continue and exit are not keywords. They could be
>> redefined.
>
> I'd appreciate when, at least in mode FPC, these words would become
> keywords. As already mentioned, a redefinition of these procedures can only
> cause trouble. When they occur in legacy code, it would do no harm when such
> modules had to be compiled in an different (Delphi) mode.

Yes, this would be a good change, similar to restrictiions on the duplicate
variable names in the overlapping scopes.
I think, however, that this change has near-zero chance of
getting through fpc core team.

One relevant data point: for many years,
I use Delphi for the "Programming 101" university course I teach.
Every year, out of approx. 15 students in the group, 5-6 make the mistake
of naming some component or variable "exit" or "break", and spend
hours or even days trying to find the problem, until they finally give
up and ask me for help.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list