Friday, May 20, 2016

I like Python's brevity

I like Python's brevity.



?



Actually, I like Python's use of indentation.  It makes the code more readable.  It closely corresponds to how many people write pseudocode on paper.  (Now, if the code could only contain vertical bars down the left, the number of which indicate the nesting level.  Hmm, I wonder



In most respects, Python is NOT a language of brevity.   Python code is often verbose.



But the use of indentation is elegant and reduces clutter.



(Perl's sigils? clutter!)









I am amused that Python3 is increasing the amount of syntactic clutter, by requiring parentheses around the arguments to print - print("a") versus pythin2 print "a".



It's a pity that Python3 could not figure out a way to allow function calls without ()s.

No comments:

Post a Comment