Patrick Dunford wrote:
Carl Cerecke wrote:

Patrick Dunford wrote:

Michael JasonSmith wrote:

On Wed, 2004-03-10 at 09:03, Carl Cerecke wrote:

As for C, the older I get, the less I like it (unless I'm writing I
program that outputs C code. Then it's OK).
It is still the ultimate programing language.  Its faults are your
faults.

OK. Can't let this go unanswered...


Too terse (a product of its era)
Best example of this has to be the {} brackets instead of begin end in Delphi.

Eh? Begin/end is far too verbose. Actually, {/begin and }/end are both redundant in well indented code, wehich is why python has no begin/end markers. They are unnecessary, and lead to difficult to diagnose (for the compiler) errors. Code is clearer without them.

So how does Python make a distinction between single and multiple statements within a structure such as a loop?

In traditional languages (inc. C and Deplhi), a block of statements is indicated to the compiler by begin/end pairs (using whatever notation). For the programmer, the block of statements is also indented to make it easier to read - indentation is ignored by the compiler. Python makes that indentation explicit - that is, it means something to the compiler. Because indentation is now significant, the begin/end is redundant. The block simply stops when the indentation level is decreased, as one would expect of well indented c/delphi code anyway. The resulting code is clearer without the excess begin/end delimiters.


Verbosity is absolutely necessary to write self documenting code as a general rule.

Except where that verbosity is excessive and/or redundant, as is the case with begin/end - then it just adds clutter.


Case sensitive

That's a pro, not a con.

Often claimed but not proved in my view.

Personal preference, I guess. Maybe there is a more substantial argument one way or the other, but I can't think of it right now.


On Windows I prefer to use Delphi. In PHP I go to un-C-like trouble to make the code easy to understand including all { } on a line by themselves.

Trouble is, with { and } on a line by themselves, you can see less of your program in your editor window. A good syntax-colouring editor means code can be vertically denser with no loss (actually, a gain) in comprehension.

All functions and procedures should be written small enough to fit within the editor window. Get a bigger screen :)

I've got a 21 inch next to my 17 inch, and get about 85 lines in my editor. Plenty of real-estate there. The more functions/methods/procedures I can see at once, the better.


Cheers,
Carl.




Reply via email to