[fpc-pascal] for .. in loop implementationt

Marco van de Voort marcov at stack.nl
Thu Jan 8 17:15:16 CET 2009

In our previous episode, Jeremy Cowgar said:
> > Clutter, maintenance, and somebody has to do both implementation and
> > maintenance, addition to documentation tool, pretty printer etc.
> >   
> I wonder how much maintenance would actually have to be done? Once a 
> language construct is present, does it really take that much to keep it 
> up? 

Well, I only see the practice from years of reading bugreports, but :

often bugreports pertaining to language features are about special cases and
interactions between features. Like automated types, properties etc. What if
the right side is an expression instead of a value or a constant? What if it
involves ref counted types, what if it involves a temp location ? Etc.

> The same for the additions to documentation, pretty printer, etc... It's
> all done once and should be fine after that.

After a few additions, patches and tweaks, usually yes. And then it turns up
that Delphi also accepts  <xxxx> after "in" etc.
> However, I am speaking out of a not ever looking at the compiler source, 
> so I may be pretty far off base. Just thinking aloud.

People typically only think of a few standard cases like there are in the
manual. It is a totally different magnitude to fix any constuction the users
find in their existing Delphi code.

If you think it is worth it, by all means go ahead.

More information about the fpc-pascal mailing list