[ale] Any language (wuz: Assembly Language?)

Jay Lozier jslozier at gmail.com
Sun Oct 27 14:17:27 EDT 2013


On Sun, 2013-10-27 at 13:10 -0400, Byron Jeff wrote: 
> On Sun, Oct 27, 2013 at 09:31:39AM -0400, Ron Frazier (ALE) wrote:
> 
> > In my opinion, the best language should ignore all white space AND NOT
> > require any curly braces or semicolons except as syntactically required
> > delimiters for lists and arrays, etc.  That's the way Clipper was, and it
> > was a real pleasure that the compiler wasn't always bugging me about
> > formatting yet still figured out how to compile the program.
> 
> I cannot see how it can be without braces. How do you differentiate this:
> 
> if a > 5 then if b < 3 then call_small_b() else do_you call_small_a_or_big_b ()
> 
> Python makes it clear:
> 
> if a > 5:
>    if b < 3:
>       call_small_b()
>    else
>       call_big_b()
> 
> as opposed to:
> 
> if a > 5:
>    if b < 3:
>       call_small_b()
> else
>    call_small_a()
> 
> Braces can disambiguate the two also. But unless a rule is imposed that
> else is always associated with the closest open if, then the original
> construct is ambiguous. And if that rule is imposed, then there's no way to
> do the second construct.
> 
> Then there is the philosophical issue of indentation. Indentation is rarely
> for the benefit of the compiler. It's task is to create organization for
> human readers. Reading improperly indented code is one of the biggest
> headaches. And as a Professor is unfortunately a task I have to do more
> often than I like.
> 
> Python's use of significant whitespace is one of the tools that actually
> simplifies the language syntax. One statement per line so no semicolons are
> required. Indentation replaces braces. It also enhances readability. If my
> E-mail is properly formatted, then the two constructs above are visually
> clear in their intent, while the original is ambiguous because there is no
> imposed structure.
> 
> Of course all this is IMHO.
> 
> BAJ
> 
> 
My understanding is Python uses standardized indentation for two
reasons:

1. make the code more understandable 
2. force programmers to use on standard method in all the code so the
relationship of each block is obvious at a glance.

The other issue about security of interpreted versus compiled misses the
point. Most security issues having nothing to do the compiler or
interpreter but with the application code. Errors such SQL injection
have nothing to do with the compiler or interpreter but with improper
handling of user input. Virtually requiring users to log in using root
privileges (e.g. Windows) is not a compiler/interpreter problem but a
fundamental design problem. 
<snip>

</snip>
-- 
Jay Lozier
jslozier at gmail.com



More information about the Ale mailing list