Why would I learn Python over other languages?

  • Thread starter Charif Lakchiri
  • Start date
G

Giles Brown

Paul Rubin said:
Sure, so can any language. I'd say it's generally simpler to toss off
a 5-line perl script for some admin task than a comparable Python
script.

So if you want to spend your time tossing off you should use perl right? ;-)

Giles
(ignoring potential cross-cultural humour difficulties.)
 
N

Nick Smallbone

The same in Python

try:
for line in File("mytext.txt"):
print line
except IOError, e:
print "Erreur", e

Umm, that won't work. Should be file instead of File.
The exception handling being useless in such a context (but still
probably mandatory in the Java version...), you can make it :

for line in File("mytext.txt"): print line

If you go for low-level programming in an interpreted language, choose
Java. If you prefer fun and productivity, you know where to find it.

Consider this : starting from scratch in both languages, you'll probably
have your application up and running in Python way before you begin to
figure out how to write it with Java.

Consider this too : There is a Java implementation of Python. So you can
have you'r cake and eat it too. (well, almost, since you'll still have
to learn the Java API, but what...)

HTH
Bruno

Nick
 
A

Arthur

In one sense I think that any language is a sufficient introduction to
itself. Given enough time and effort you learn every trick, see every
corner exposed by someone (perhaps someone with a different background
than you) and learn everything there is to possibly know.

Part of the problem here is language, in the words sense of language.

If Python were an early and dominant programming language, the
language used to speak about Python would have evolved differently.
Much of the discussion about Python is in words that don't seem native
to it. So it becomes near impossible to follow discussions about
Python, with only Python background.

And I think more generally, the issue is that one cannot fully
understand a tool like Python without understanding what problem it is
solving.

It is, it seems to me, solving the problem of programming in a lower
level language. From which its language is drawn.

Art
 
A

Anthony Roberts

It seems to me sensible to believe that someone can become a quite
decent, say C++ programmer, by tackling it as a first language, and
sticking with it.

I don't think that is true of Python. I think there is a layer of
Python that one cannot reasonably penetrate without stepping outside
of Python.

One can get started with Python, with Python.

But in the end I don't think Python serves as a fully adequate
introduction to itself.

That's actually a very good point...

Someone without experience writing complex programs in an OO language
(Java is probably best, as much as it pains me to say it) won't be able
to maintain a large project in Python, and someone that's never touched
C won't know enough about the underlying principals to take full
advantage of some aspects of Python. Not the least of which is actually
writing modules for Python in C...

I do think that C++ should be avoided though. Programmers that first
learned Java or C seem to be able to go on to other languages pretty
easily. Even better, Pascal, as it's impossible to write a useful
program without first learning another language.

But all C++ programmers want to know is how they can get the features
they're used to in whatever new language they're presented with.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top