Python is wierd!

Jonathan theebh at yahoo.com
Tue Jul 25 01:13:01 EDT 2000


Hi, just finished going through the 'Learning Python' book, and the
feeling that i get is that Python is really wierd(compared to other
conventional languages like C++, Java, etc). For e.g.(correct me if i'm
wrong)

1. There are no keywords to declare static or instance variables; it
all depends where they are placed(whether it's right after the <class>
statement, or inside a <def>). Isn't it harder for other programmers to
know at one glance what type of attributes the class define?

2. No *formal* declaration of static class methods, e.g. no 'static'
keyword (though i'm not sure how useful static methods are in OOP
design). I read somewhere in this newsgroup that the workaround way is
to define the method outside of the class - doesn't it break
the 'encapsulation' a class suppose to have?

3. No keywords to differentiate between passing arguments by reference
or value! An integer is passed by value(reference to a new copy), while
a mutable object is by reference. To pass a list by 'value', i know you
just need to insert one more line(list = [:]), but it seems
so 'inconsistent' compared to Java or even PHP.

(Not to mention the number of 'gotchas' listed in the book that are
bound to trap beginners - *shudder*)

The reason i'm picking up python is that i got sick of PERL:), and
don't really like the inflexible typing of Java. Furthermore, some ppl
claim that Python is easier to learn, enables you to write much cleaner
codes... However, after reading the python book, my head is still
spinning, trying to catch all the 'intricacies' of this language. No
doubt it will be a powerful and useful 'tool' to me once i get used to
it; but i don't think it's suitable to be a first programming language
for non-programmers(i read somewhere about this project going on).
Pascal(for procedural) and Java(for OOP) is still the better choice to
start off, IMHO.

regards,
Jonathan


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list