[fpc-devel] Semicolon before else

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Jan 29 13:44:49 CET 2010

Marc Weustink wrote:
> So this feature is inconsistent ?


> Now, due to changed requirements, 1 and 3 shout do the same, so I change 
> the case into:
>   case Foo of
>     1,3 : DoOneAndThree;
>     2 : If a then DoA; else DoNotA;
>   end;
> This will affect the meaning of 2 too, without noticing...
> No thank you.

Excellent example and perfectly showing where the new behaviour would break
existing code without notice. I vote against this feature too, purely
because it is inconsistent in behaviour.

Object Pascal is about simple easy to read and understand code, it doesn't
need such inconsistent and confusing features. The current syntax is clear
as rain and doesn't cause confusion. Adding or removing a simple ;
character where needed is not effort at all.

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-devel mailing list