Content deleted Content added
Phil Boswell (talk | contribs) →Formatting of C examples: I think the whole problem is caused by formatting the C example in the same fashion as the Python version. Try re-writing the C version in a single line |
|||
Line 127:
::Sorry for the removal of the braces in the first place. I made the change facetiously to try to raise the point that it was a poor example since it was valid without the braces. When I first read the comparison of Python code and C code, it did not clearly communicate to me the difference between the two, because I (as a seasoned C programmer) immediately saw that I could remove those braces. Without the knowledge that Python is indentation based, I (as having no prior knowledge of Python) was momentarily confused since it would be natural to assume (to a C programmer) that perhaps it didn't require braces since it only consisted of one statement. Of course, having read the rest of the text, I realised the point that was being attempted to be made, but isn't the intention of the example to make it obvious? I think that, although the page is about Python, since the comparison is with C, the example should be clear to C programmers what the intented point was. — The anon that made the change 11:23, 22 Sep 2004 (UTC)
:I think the whole problem is caused by formatting the C example in the same fashion as the Python version. If you re-write the C version in a single line, converting all whitespace to single spaces, you might get the idea across better. HTH HAND --[[User:Phil Boswell|Phil]] | [[User talk:Phil Boswell|Talk]] 12:33, Sep 22, 2004 (UTC)
|