Python is wierd!

ye, wei yw at alabanza.net
Tue Jul 25 15:20:06 EDT 2000


Jonathan wrote:

> 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?

This is what I couldn't tolerate as well!!
I'm the same guy is looking for another new language, my path
is C/C++->Java->PHP->Perl.

>
>
> 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?

I don't much care about this.

>
>
> 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.

I'm the same frustrated as you about the Perl/Java and now Python,
Java is a good language, however it's not open language. Perl has some
language deficients as well. Python is so loose for type checking. However

today I just read the Perl6 vision, it makes me very exciting -

http://www.perl.org/perl6/pr/initial_meeting.html
The new Perl 6 will support Typing(e.g. "my Dog $spot") , OO, Threads and
more features!!

It also will bring some python's features into Perl.  :)

> 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.
> --
> http://www.python.org/mailman/listinfo/python-list

--

Sincerely,

Wei Ye







More information about the Python-list mailing list