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) ?
what can i do easily with python which is not easy in c++/java !?
Tnx,
Raxit www.mykavita.com 16 1695
On 2008-05-08, Ra***@MyKavita.com <ra************@gmail.comwrote:
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) ?
Yes, and all programs that people write typically look like the hello world
program.
Look at some real-world programs for a comparison, for example the Python
Cookbook: http://aspn.activestate.com/ASPN/Cookbook/Python/
what can i do easily with python which is not easy in c++/java !?
- be productive in programming, rather than hassling with declaring all kind of
stuff first.
- skip compile step.
On the other hand, if you typically write hello world programs, don't bother.
You won't see the difference.
Sincerely,
Albert
On May 8, 5:25 am, "Ra...@MyKavita.com" <raxitsheth2...@gmail.com>
wrote:
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) ?
what can i do easily with python which is not easy in c++/java !?
Are you a newbie to Python, or to programming in general? I'll assume
you are a newbie to programming in general because of that last
question you asked. Things in Python are easier than in almost any
other programming language. Here are three Hello World programs:
--------------C++---------------------
#include <iostream.h>
main()
{
cout << "Hello World!";
return 0;
}
--------------------------------------
-------------Java---------------------
class HW {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
--------------------------------------
------------Python--------------------
print "Hello World!"
--------------------------------------
--------------C#----------------------
<I have no idea!>
--------------------------------------
I think you can clearly see which one is easiest. Of course, that
doesn't mean that the "easiest" language is always the "best"
language, although it is a strong point. But ease of use is just a one-
in-a-million characteristic of Python. If you're a total beginner, I'd
recommend you learning the one that attracts you the most. Ra***@MyKavita.com 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
Hi Raxit,
One of the the tempting features of Python is that it is fun to code
in Python. If you are really trying to learn python, you should read
Adventures with Neko ( http://gnuvision.com/books/pybook/) . It is an
introductory book on Python programming for school children by Mr.
Pramode CE.
It is fun for children (when I tried it, me too liked it) to do
programming with Neko, the cat. I am sure that it will be a fun filled
learning experience for you.
Regards,
Maxin B. John
pistacchio wrote:
Ra***@MyKavita.com 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
C#
using System;
namespace HelloWorld
{
Class HelloWorld
{
static void Main(String[] args)
{
Console.WriteLine("Hello World");
}
}
}
hello,
I have programmed co insidentally in all the 3 languages.
so out of my experience of 10 + years, I got my personal share of
reasons to prefer python over the other 2 namely c++ and java.
firstly as every one has already explained, python is easy, fun to
learn and can do many things much productively for programmers
compared to c++ and java.
and c# is no better in that.
besides, now a days python has become much much faster in some cases
faster than java.
compare pygtk vs java swing.
python has huge amount of libraries/ modules which are as easy to use
as the language itself.
the syntax difference mentioned in the first email on this thread
makes a huge difference when the code becomes complex and the number
of lines increase.
so there are a lot of reasons to prefer python over java.
for the question "what can I do in python easier than other languages
" is not a question to be answered because it all depends on how one
associates the problem space with the language space in which the
programmer wishes to express the solution.
there will be people who will say "java is much better choice for
large scale programmes " but people like myself will always question
that.
happy hacking.
Krishnakant.
On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote:
Are you a newbie to Python, or to programming in general? I'll assume
you are a newbie to programming in general because of that last
question you asked. Things in Python are easier than in almost any
other programming language. Here are three Hello World programs:
Counterexamples for quite short "greetings" in other programming languages:
(Free)BASIC::
Print "Hello World!"
OCaml::
print_string "Hello World!" ;;
Io::
"Hello World!" linePrint
Haskell::
main = putStrLn "Hello World!"
Ciao,
Marc 'BlackJack' Rintsch
Marc 'BlackJack' Rintsch ha scritto:
On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote:
>Are you a newbie to Python, or to programming in general? I'll assume you are a newbie to programming in general because of that last question you asked. Things in Python are easier than in almost any other programming language. Here are three Hello World programs:
Counterexamples for quite short "greetings" in other programming languages:
(Free)BASIC::
Print "Hello World!"
freebasic is another language i'd point out to a newbie, even if it is
not as multiplatform as python if. it has a decent community and a large
amount of libraries. it doesn't let you explore functional or, worse,
object oriented programming nor you can write server side programs with it.
The others are examples of easy "hello world" languages, but, passed
that, i think they don't have the same capabilities of python on terms
of support, kind of programs you can write and even overall complexity
(haskell forces you to functional programming, io is really a minor
language, ocalm forces you to di OOP and, if writing hello world is
simple, on the other hand ir may have lines of code that read like:
| [] -[]
and that negatively compesate the easy way you can write "hello world"
OCaml::
print_string "Hello World!" ;;
Io::
"Hello World!" linePrint
Haskell::
main = putStrLn "Hello World!"
Ciao,
Marc 'BlackJack' Rintsch
On Thu, 08 May 2008 15:49:01 +0200, pistacchio wrote:
Marc 'BlackJack' Rintsch ha scritto:
>On Thu, 08 May 2008 04:17:01 -0700, s0suk3 wrote:
>>Are you a newbie to Python, or to programming in general? I'll assume you are a newbie to programming in general because of that last question you asked. Things in Python are easier than in almost any other programming language. Here are three Hello World programs:
Counterexamples for quite short "greetings" in other programming languages:
(Free)BASIC::
Print "Hello World!"
freebasic is another language i'd point out to a newbie, even if it is
not as multiplatform as python if. it has a decent community and a large
amount of libraries. it doesn't let you explore functional or, worse,
object oriented programming nor you can write server side programs with
it.
OOP support is under development and why can't you write "server side
programs" in it? CGI is possible.
The others are examples of easy "hello world" languages, but, passed
that, i think they don't have the same capabilities of python on terms
of support, kind of programs you can write and even overall complexity
(haskell forces you to functional programming, io is really a minor
language, ocalm forces you to di OOP and, if writing hello world is
simple, on the other hand ir may have lines of code that read like:
| [] -[]
Okay, Haskell's pure functional approach feels somewhat "weird".
Io is a minor language but a quite nice one IMHO. Simple syntax and
relatively simple semantics but very powerful.
OCaml doesn't enforce OOP. It's some kind of "mirror" of Python. Python
is an OOP language with support for functional programming, and OCaml is a
functional language with support for OOP.
The biggest pro for Python among the easy and clear syntax languages is
the standard library and the amount of third party modules.
Ciao,
Marc 'BlackJack' Rintsch Ra***@MyKavita.com wrote:
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) ?
what can i do easily with python which is not easy in c++/java !?
With Python, you can program with a smile on your face.
(Truly, when I found Python, programming became fun again.)
Gary Herron
Tnx,
Raxit www.mykavita.com
-- http://mail.python.org/mailman/listinfo/python-list
pistacchio <pi********@gmail.comwrites:
ocalm forces you to di OOP
Ocaml *allows* you to do OOP. It's very much an optional feature of
the language, just like for Python.
--
Arnaud
pistacchio a écrit :
(snip)
Technically speaking, it (Python) is not, for example, strongly
typed,
You're confusing "strong" typing with static typing. Somewhat orthogonal
issues.
On May 8, 7:25*am, "Ra...@MyKavita.com" <raxitsheth2...@gmail.com>
wrote:
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) ?
All the languages have similar "power", in a theoretical sense. If
you can solve a problem with one, most of the time you'll be able to
solve it with the other. So we could say that the languages are
"equal".
However, in practice, the syntax matters a lot. For example, they
will influence on the maintainability and the performance of your
application.
>
what can i do easily with python which is not easy in c++/java !?
Pretty much everything. Python syntax is minimalist, so it requires
much less code. There are many examples in Wikipedia, for example: http://en.wikipedia.org/wiki/User_da...e_.28Python.29 http://pt.wikipedia.org/wiki/Radix_s...B3digo_em_Java http://en.wikipedia.org/wiki/Observer_pattern#Python
etc.
>
Tnx,
Raxitwww.mykavita.com
In article <12**********************************@v26g2000prm. googlegroups.com>,
maxinbjohn <ma********@gmail.comwrote:
>Hi Raxit,
One of the the tempting features of Python is that it is fun to code in Python. If you are really trying to learn python, you should read Adventures with Neko (http://gnuvision.com/books/pybook/) . It is an introductory book on Python programming for school children by Mr. Pramode CE.
It is fun for children (when I tried it, me too liked it) to do programming with Neko, the cat. I am sure that it will be a fun filled learning experience for you.
In article <ma**************************************@python.o rg>,
Gary Herron <gh*****@islandtraining.comwrote:
> With Python, you can program with a smile on your face.
+1 QOTW
>(Truly, when I found Python, programming became fun again.)
"Again"? Looking back over the years, after I learned Python I realized
that I never really had enjoyed programming before.
--
Aahz (aa**@pythoncraft.com) <* http://www.pythoncraft.com/
Help a hearing-impaired person: http://rule6.info/hearing.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: karokat |
last post by:
Hi, I want to learn how to program and python seems to be the most intuitive language according to various internet sources - but I'm not sure if it's best for newbies... please advise..
Anyway,...
|
by: Grayham |
last post by:
Hi all
I am new to this group so 'Hello All'
I have a PC which is running linux and in it have installed a digital
satellite card. I would like to write some software to access the card,
tune...
|
by: Sells, Fred |
last post by:
write working programs
|
by: andrew.smith.cpp |
last post by:
I have Heard About "Python" its a OOD Language. i have to Learn it
where from i should start it.
i have python compiler at linux Platform.
anyone can suggest me about it.
Thanks In advance.
|
by: Sells, Fred |
last post by:
get a python-aware editor. I vary between emacs and Eclipse, depending on my mood and the size of the project.
|
by: idiolect |
last post by:
Hi all - Sorry to plague you with another newbie question from a
lurker. Hopefully, this will be simple.
I have a list full of RGB pixel values read from an image. I want to
test each RGB band...
|
by: Edwin.Madari |
last post by:
-----Original Message-----
statement prepared first and executed many times with exectemany - db API http://www.python.org/dev/peps/pep-0249/
inline statemets can be exeucuted only.
hope that...
|
by: Mladen Gogala |
last post by:
I am a Python newbie who decided to see what that Python fuss is all about.
Quite frankly, I am a bit perplexed. After having had few months of
experience with Perl (started in 1994 with Perl v4,...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made but the http to https rule only works for...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
header("Location:".$urlback);
Is this the right layout the...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
| |