Python vs. Perl, which is better to learn?

Patrick W quitelikely at yahoo.com.au
Fri May 3 10:54:01 EDT 2002


jason at jvoegele.com (Jason Voegele) writes:

> [...]
> On the other hand, the ability to call functions without parentheses
> is not so clear-cut.  Some believe that it leads to less readable
> code.  Others (such as myself) view it as essential for supporting the
> Uniform Access Principle.  Usually I'll leave the parentheses off of a
> method call if it takes no arguments, which allows me to switch
> between using a variable and using a method more easily.  I also find
> it easier to read in such cases.  I find empty parentheses() as you
> find in C++, Java, and Python rather ugly (a "call" statement in
> disguise, as it were), although at least in Python and C++ they are
> actually an overridable operator, whereas in Java they are just
> gratuitous syntax.

FYI, recent versions of Python also support the "Uniform Access
Principle" via "properties" (like Delphi and, now, C#). Not sure which
version of Python introduced this, but it's a nifty little
enhancement, IMO.




More information about the Python-list mailing list