[Lazarus] Verdict of Lazarus 0.9.29

A.J. Venter aj at outkastsolutions.co.za
Thu Oct 21 15:10:50 CEST 2010


>> Actually, I rarely break my If statements across more than one line
>> save to accommodate large logic statements for code readability.
>>
>> if (condition1=condition2) or (conditionx=conditiony) then begin
>>   // code here
>> end else begin
>>   // more code here
>> end;
>
> I never got used to having begin not on a newline. Even despite having
> used modula2 for use (but M2 has no single line blocks to disambiguate).

Actually I missed that bit, I agree - it's better to put begin and end
statements on their own lines.
It makes blocks just that much easier to differentiate.

In C there seems to be two popular approaches, one putting the opening
{ on the same line (this seems to be by far more popular one in
languages like python) and the other putting it on it's own line as we
normally do with begin.
This is the GNU prescribed style I believe.

Either way I think it's slightly less important when you have a
single-character opening statement, when you have a whole word, it
changes things a bit.

Still - I would rather have OP which lets me define an indentation
style and then sometimes break it when it makes sense, than python
which dictates one to me in absolute terms by removing the block
statements entirely and making indent = block.
-- 
A.J. Venter
Founder and lead developer, Kongoni GNU/Linux
www.kongoni.co.za
www.silentcoder.co.za - Blog




More information about the Lazarus mailing list