[fpc-pascal] a proposal about "with" syntax

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Mar 18 10:56:07 CET 2013


On Mon, 18 Mar 2013 15:36:13 +0800
Xiangrong Fang <xrfang at gmail.com> wrote:

> Alternatively, how about just use SPACE to separate the token? i.e.:
> 
> with SomeObject o1, SomeOtherObject o2 do....

I think this is a bad idea.
One of the strengths of Pascal is its verbosity/redundancy which allows
unambiguous error messages and avoids many common mistakes.
For example when I forget a comma
  with A B do
the compiler points to B and writes "DO" expected but "identifier B"
found.
Using a space as separator compiles this without error.

 
> Because you need a COMMA for 2 or more expressions in with, and SPACE is
> not valid in token?

Mattias



More information about the fpc-pascal mailing list