Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63744

Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined?

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <drsalists@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'languages.': 0.04; 'subject:Open': 0.05; '(except': 0.07; 'c++,': 0.07; 'detect': 0.07; 'incompatible': 0.07; 'mentioned,': 0.07; 'pypy': 0.07; 'reason,': 0.07; 'subject:Question': 0.07; 'welcome.': 0.07; 'mind,': 0.09; 'portions': 0.09; 'rewrite': 0.09; 'slow.': 0.09; 'strings.': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'assume': 0.14; "wouldn't": 0.14; "api's": 0.16; 'cc:name:python list': 0.16; 'correctness.': 0.16; 'easier.': 0.16; 'mardi': 0.16; 'mark,': 0.16; 'reusable': 0.16; 'subject: \n ': 0.16; 'subject:java': 0.16; 'subject:programming': 0.16; 'symlink': 0.16; 'tends': 0.16; 'subject:python': 0.16; 'java,': 0.16; 'sat,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'basically': 0.19; 'working.': 0.19; 'memory': 0.22; 'programming': 0.22; 'coding': 0.22; 'tests': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'either.': 0.24; 'oriented': 0.24; 'replace': 0.24; 'tend': 0.24; 'java': 0.24; 'question': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'words': 0.29; 'errors': 0.30; 'subject:please': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; '(which': 0.31; 'code': 0.31; 'easier': 0.31; 'are.': 0.31; 'group:': 0.31; 'probably': 0.32; 'another': 0.32; 'open': 0.33; 'are:': 0.33; 'programmers': 0.33; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; 'subject:with': 0.35; 'basic': 0.35; "can't": 0.35; 'advice': 0.35; 'classes': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'c++': 0.36; 'programming,': 0.36; 'words,': 0.36; 'subject:?': 0.36; 'hi,': 0.36; 'similar': 0.36; 'application': 0.37; 'too': 0.37; 'operating': 0.37; 'performance': 0.37; 'starting': 0.37; 'sometimes': 0.38; 'problems': 0.38; 'called': 0.40; 'problems.': 0.60; 'solve': 0.60; 'most': 0.60; 'today,': 0.61; 'advanced': 0.63; 'more': 0.64; 'different': 0.65; 'great': 0.65; 'approaches': 0.68; '(apparently': 0.84; 'etc..': 0.84; "it'd": 0.84; 'proves': 0.84; 'quicker': 0.84; 'prone': 0.91; 'reasons,': 0.91; 'hand,': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=NfO4GOdEZCKu7cUA/qH4zhu0e0TIyqOKNndrvbmSOHU=; b=rAwqQfN3FO9k31LYdIgFGvEIf6LCbAD4bTWeicltC+zr4VuBEbOWe8auYmaY/7M9f8 9mmhIBwSioqVnk76/Faa9/g8E0ZdC1ccmmSBEmF2tlWSMdbY4Q5+d9xVywccn96tC8bx PVJTL5x9wjlHtqcbZhZTdS/anopTEH6i7sp4V1/oh4uvZo7XQvONmGrGss+5BwqkxSY/ hsi3DAI1fz3DEYcIo09w2isTwjYBFf/2lhD5Xx2wC/dddsVJluUmpBl9aGfE5hO91i5U UR0W2RvNX3rdCAcX4Y8sZYhjupxMXk3Ml4+FaVjddveA+XVDj77RaSo5RGSOlc517vo8 HiqA==
MIME-Version 1.0
X-Received by 10.194.90.41 with SMTP id bt9mr395159wjb.90.1389494583102; Sat, 11 Jan 2014 18:43:03 -0800 (PST)
In-Reply-To <18b67e59-39d1-41e2-8977-b1c449b132e7@googlegroups.com>
References <18b67e59-39d1-41e2-8977-b1c449b132e7@googlegroups.com>
Date Sat, 11 Jan 2014 18:43:03 -0800
Subject Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined?
From Dan Stromberg <drsalists@gmail.com>
To pintreo mardi <bigearl497@outlook.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5351.1389494591.18130.python-list@python.org> (permalink)
Lines 56
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1389494591 news.xs4all.nl 2866 [2001:888:2000:d::a6]:36418
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:63744

Show key headers only | View raw


On Sat, Jan 11, 2014 at 12:07 AM, pintreo mardi <bigearl497@outlook.com> wrote:
> Hi, I've just begun to learn programming, I have an open question for the group:
> Is the Python language an all in one computer language which could replace C, C++, Java etc.. I only ask becuase I am starting off with python and I want to learn everything in basic and advanced programming with python itself...So any advice and suggestions would be more than welcome.
> Thanks!!

As others have mentioned, they're all turing-complete.  In other
words, with an infinite memory and infinite coding patience, they can
all solve the same problems.

The main distinctions, at least to my mind, are:
1) Python tends to require fewer words to solve the same problems, but
tends to be slow running.
2) C tends to be very fast running, but takes a lot of words to solve
the same problems, and is prone to hard-to-fix memory errors
3) C++ and Java aren't that different in performance today, because of
Java's good JIT.
4) Java's not great for systems programming (apparently can't detect
symlink races for example), but C, C++ and sometimes Python are.

Each language will tend to have API's (Application Programming
Interfaces) that make some classes of problems easier or harder.
API's are basically reusable code you can use to make your own
problems quicker and easier.

You probably wouldn't write an operating system kernel in Python -
it'd be too slow.  However, writing an application in Python might be
a very good use of time.

If Python proves too slow for a problem (which is uncommon), you can
rewrite small portions in C to get good performance.  Also, there is
another implementation of Python called PyPy that's much faster than
the reference implementation, which is known as CPython.

C++ and Java cover similar kinds of programming - they're both object
oriented C-like languages.  However, C++ is more prone to memory
errors than Java, and I'm told that C++ has many incompatible
implementations of fundamental things like strings.  For these
reasons, I'd recommend Java over C++ for most things (except systems
programming).

C, C++ and Java are all statically, manifestly typed.  Python is duck
typed.  These are fundamentally different approaches to program
correctness.  In C, C++ and Java, programmers tend to assume that if a
program compiles, it's working.  This is not a great assumption, but
it isn't that far off the mark, either.  Python on the other hand,
will compile a lot more programs than those that work - for this
reason, it's a very good idea to use automated tests with Python.
Automated tests are a good idea with C, C++ and Java too, just not as
crucial.

HTH

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? pintreo mardi <bigearl497@outlook.com> - 2014-01-11 00:07 -0800
  Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Chris Angelico <rosuav@gmail.com> - 2014-01-11 19:21 +1100
    Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? pintreo mardi <bigearl497@outlook.com> - 2014-01-11 02:10 -0800
      Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-11 10:51 +0000
  Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-01-11 10:47 +0000
  Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Roy Smith <roy@panix.com> - 2014-01-11 10:45 -0500
    Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Steve Hayes <hayesstw@telkomsa.net> - 2014-01-12 07:08 +0200
      Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Chris Angelico <rosuav@gmail.com> - 2014-01-12 16:58 +1100
        Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Rotwang <sg552@hotmail.co.uk> - 2014-01-12 14:36 +0000
          Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Chris Angelico <rosuav@gmail.com> - 2014-01-13 01:44 +1100
  Re:Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Dave Angel <davea@davea.name> - 2014-01-11 19:37 -0500
  Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? matej@ceplovi.cz (Matěj Cepl) - 2014-01-12 02:36 +0100
  Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Dan Stromberg <drsalists@gmail.com> - 2014-01-11 18:43 -0800
  Re: Open Question - I'm a complete novice in programming so please bear with me...Is python equivalent to C, C++ and java combined? Grant Edwards <invalid@invalid.invalid> - 2014-01-12 18:53 +0000

csiph-web