why ; ?

Michael Neumann mneumann at ntecs.de
Thu May 8 08:30:08 PDT 2008


Don wrote:
 > Walter Bright wrote:
 >> Nick Sabalausky wrote:
 >>> Python's semantically-meaningful indentation was intended to fix the
 >>> problem of poorly-indented code by enforcing proper indentation in
 >>> the language and compiler. But the problem is, it *doesn't* actually
 >>> enforce it. In fact, it *can't* enforce it because it doesn't have
 >>> enough information to enforce it. All it really does (and all it's
 >>> able to do) is run around *assuming* your code is properly indented
 >>> while silently drawing semantic conclusions from those (obviously not
 >>> always correct) assumptions.
 >>>
 >>> In fact it's really the same root problem as "no variable
 >>> declarations". In both cases, the compiler does nothing but assume
 >>> that what you wrote is what you meant, thus silently introducing
 >>> hidden bugs 1. Whenever you didn't *really* want the new variables
 >>> "my_reponse" and "my_responce" in additon to "my_response"
 >>> (VB/VBScript coders use "option explicit" *for a reason*), and 2.
 >>> Whenever you didn't *really* want to break out of that 
loop/conditional.
 >>
 >> That goes back to the point that a language needs redundancy in order
 >> to detect errors. Having semantically-meaningful indentation, removing
 >> redundant semicolons, and implicitly declaring variables all remove
 >> redundancy at the (high) cost of inability to detect common bugs.
 >>
 >> Those things are fine for scripting language programs that are fairly
 >> short (like under a screenful). It gets increasingly bad as the size
 >> of the program increases.
 >
 > Implicitly declared variables are probably the greatest of all false
 > economies in the programming world.
 >
 > bugs(no variable declarations) > 100 * bugs(dangling pointers).

Is that your own experience? Only practice tells the truth!

Would you say that Smalltalk is a scripting language? See where it is
used, and notice the size of the applications written in it.

I am sure every C program includes more errors than the worst
Ruby/Python program you can ever write. Not so sure about other
scripting language... :)

Regards,

   Michael



More information about the Digitalmars-d mailing list