[EMAIL PROTECTED] ha scritto:
Hi,
i was reading/learning some hello world program in python.
I think its very simillar to Java/C++/C#. What's different (except
syntax) ?
well, it's similar in the sense that it is a programming language. So
you can say that assembly is similar to BASIC, but that both are
different from finnish, but from a programmer's point of view, they're
all rather different languages.
what can i do easily with python which is not easy in c++/java !?
generally speaking python is said to be easier to pick up for a pletora
of reasons. technically speaking, it is not, for example, strongly
typed, nor it forces you to use a programming paradigm like object
oriented programming.
This means that if you just want to see your name printed on the screen
you can simply write:
print "raxit"
and get the work done. to understand it you just have to understand some
basics like what is a string and what is a statement.
in java, for example, it would look like:
public class HelloWorld {
public static void main(String[] args) {
System.out.println("raxit");
}
}
in short, to obtain the same result (limited to this case) you have to
write 650% more code and you're forced to know what is a class, what
namespace means, what is a function (and arguments) and what are methods
and the dot notation and an array. not that you won't encounter all of
them learning python, but you're presented with all of them, all at
once, in the moment where you just want to write the simplest program.
that's why a typical java beginner's guide starts with ditto examples
and adds: "ignore everything for the moment". i hate when i have to
ignore things of a code that i'm writing!
the same applies to C# and, to a certain extend, C++ that is a much
older language and present different learning problems.
Now, what can you do with python? Virtually everything (network
programming, game programming, server side scripting). In most cases, it
would run slower than it would do with the other languages (even slower
than the slow java). You won't do drivers or kernels in python, but you
won't even code them in java or C#.
the programs you'll write will mostly run on a number of different
platform, like java programs. porting a c++ is a bit tougher. at the
moment there is project (mono) that is porting the .net platform (where
c# runs) to multiple platforms, but basically, if you write a c# program
you're programming for windows.
hope it helps
Tnx,
Raxit
www.mykavita.com
--
http://mail.python.org/mailman/listinfo/python-list