[fpc-devel] Semicolon before else

Pete Cervasio cervasio at airmail.net
Fri Jan 29 09:37:13 CET 2010

On Friday 29 January 2010 01:52:59 Juha Manninen wrote:

> For Graeme and others: the problem is not the amount of typing. The problem
> is that you can easily forget this semicolon

It's not like you have to drop off your punch cards and come back tomorrow 
afternoon, is it?  I usually don't even have time to take a -sip- of coffee 
before the compiler's done finding my mistakes, let alone getting up to go 
chat with the other developers for a couple of minutes.  I sometimes miss the 
days of

	What are you doing?  Get to work.
	Oh, ok.

> when you for example add ELSE 
> to an existing IF. First there had to be a semicolon and then there must
> not be semicolon... Non-intuitive.

Wait, what?  It's absolutely intuitive.  To use a bad analogy, there had to be 
a semicolon because you were at the end of the "sentence".  When you add 
the 'else foo' part to that sentence, it's going between the words that were 
already there and the semicolon that was already there because it's part of 
that same sentence.  It's just like you're adding a ", and then more stuff" 
to an english language sentence.

> So, the goal is to make the language more intuitive and
> programmer-friendly.

But above that you wrote:

> Anyway, there are some weird cases when it's difficult to
> tell which IF the ELSE belongs to.

That's neither intuitive nor friendly to me.  But if it works for you and 
makes your programming better, then I'm glad you came up with it.

Best regards,
Pete C.

More information about the fpc-devel mailing list