[fpc-devel] Re: [fpc-l] type discussion

L505 fpc505 at z505.com
Sun Jun 5 14:32:27 CEST 2005

| lol - thats not what I meant. If you want readable code you indent
| inside the begin..end blocks ergo the begin..end syntax becomes
| redundant cause its the indentation that provides the visual cue.

That's like taking question marks out of sentences that you know are questions. Why
have question marks if you know it is a question? If there is a space after the
question, and the question always starts with something like "what", "where" "when"
why", then -what good- is a question mark?

There are plenty of reasons. One is that the human brain doesn't have time to figure
out whether or not it is a question.. it is just a extra helper symbol to verify that.
The other is that if you are looking specifically for questions and you don't have
time to read the entire article, at least you can easily see them ( ┬┐even easier in
spanish?). The other is that when you start deleting words from the sentence, at least
the question mark still is there after you've deleted some text. And you know that the
structure of words is still supposed to be a question, even if after deleting things.
You would have less change of knowing it was a question if there was no question
mark.. because after deleting some stuff and reorganizing your article, it may appear
as though it is a regular sentence, not a question.

Personally I like spanish upside down question mark, because it would help me when I
was scanning articles for questions from forward to end. English question marks only
help me when I am scanning the article from backward to forward. I've never taken or
learned spanish though, so I am not bias. So maybe you think spanish is redundant, but
I think even one question mark is sometimes not enough.

Start deleting your code without begin end blocks and reorganizing things.. if these
visual pointers are not there you may end up putting code in places that are not
correct, because you accidentally lost that indentation while hitting delete key, and
while the editor wasn't indenting the way you thought it would. If the begin end were
there, at least you'd have a secondary opinion from the code telling you.. "hey..
wait, this is supposed to be a begin end block here, even if your indentation is wrong
after refactoring."

I lost my indentation, but at least I know where it goes, due to the secondary helpers
begin and end. Just because my text editor was acting funny with tabs today, all my
code is not broken? Because of the secondary savers.
Ididntindent:= 'yes';
afterrefactor:= true;

Where does this code go below? I lost my indentation, so where does it go in the
code??? Just because my text editor was acting funny with tabs one day all my code is
broken now?
Ididntindent:= 'yes';
afterrefactor:= true;

 Personally, I use indenting for other parts of organizing code once in a while.. not
just for begin end. So if was to write:

othervar:= 'test';
othervar2:= 'test2';

  setting1:= true;
    for i:= 1 to 5 do
      edit1.color:= red;

othervar:= 'testa';
othervar2:= 'testb';

   setting2:= true;
     for i:= 1 to 5 do
       edit1.color:= red;

See how setting1  and setting2 is tied to the for statement using indentation of the
for statement? I do that because the for statement only applies to setting 2. Helps
organize code. Helps show that setting2 only really applies to that for statement. So
if I had forced indentation on me, that may be illegal and that may initiate a begin
end when I didn't even want it to.

Now there are some bondage discipline languages and Pascal is considered one.. even
though it's not case sensitive.. isn't indentation sort of bondage-discipline?

More information about the fpc-devel mailing list