Am 2017-05-24 um 13:59 schrieb Graeme Geldenhuys:
> But in Object Pascal you have...
>
>  begin
>     ...
>     if <whatever> then
>     begin
>       ...
>       if <whatever_else> then
>       begin
>         ...
> Object Pascal blocks are longer to type - “begin” vs ”{” and “end” vs ”}”.

I don't know why this argument pops up over and over again.
To me it's just the opposite:
I can type "begin" and "end" much faster than the cryptic { and } (on my german keyboard). I use all 10 fingers for typing and each special character is an interruption in my coding flow..

Also, as I already often said:
Program code is *written* only once but maybe *read* very often.
I prefer readable code even if it takes a millisecond longer to type (which is not the case for me!)


> Also IF statements require the extra “then” keyword etc.

Same argumentation here.
I don't bother to type just another (ASCII) word.
Before I can think about a delay it is typed already...


> As for indentation. At least with real TAB character indentation, you can configure the width of a TAB as a user configurable parameter without affecting the source code. With space indentation you are stuck with whatever the original author did.

That does not help me as I use an indentation scheme that not only relys on TABs.
I always indent the begin (and end) of a block together with the block:

if true then
   begin
   DoSomething;
   end;

This way the indentation always looks similar
independent from whether you have begin/end or not:

if true then
   DoSomething;

Some people indent the code lines only:

if true then
begin
   DoSomething;
end;

And some write the begin on the same line:

if true then begin
   ...
end;

You cannot solve all these cases just by TABs.

_______________________________________________
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other

Reply via email to