A night flight to Python
[Read this article]
Python
is a Scripting language like javascript, vbscript, beanshell, perl,
Tcl etc. The role of any scripting language is to make programming more conducive
for day-to-day tasks than for a sprawling project. Because of this requirement, usually
these languages are freely typed; meaning you cannot (or need not) explicitly specify
the type of the variables. One completely rare modern feature in Python is its
indentation based code blocks; the curly braces of C, Java are made unnecessary
with the requirement of well indented code blocks. One nice effect of this model
is that the code is clean to look at and very readable. Though this feature might
look odd for a Java or C coder, it is in fact very compact and effective. The
beautiful article
quoted in the
Thinking in Python
online book by Bruce Eckle, about the active open source
guru Eric S. Raymond's first exposure and eventual love bond with Python, is a
vivid and inspiring read for a start.
For sometime now, I'm feeling this stark gap. Like the rest of the Java world, I was
thrilled by the power of Apache Jakarta Ant,
the declarative XML build tool. But that too
is very limiting sometimes when I'm pressed for a loop like processing.
...To say I was astonished would have been positively wallowing in understatement.
It's remarkable enough when implementations of simple techniques work exactly as
expected the first time; but my first metaclass hack in a new language, six days
from a cold standing start? Even if we stipulate that I am a fairly talented hacker,
this is an amazing testament to Python's clarity and elegance of design.
|