![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Programming Talk This forum is for all programming questions. The questions do not have to be directly related to Ubuntu and any programming language is allowed. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Day Old Decaf
![]() Join Date: Jun 2006
Location: CT, USA
Beans: 5,268
Ubuntu 6.10 Edgy
|
Why to love/hate Python
To avoid shifting threads off-topic by responding to relative merits of Python (which is my preferred language), I decided to start this thread. If we can have sticky about such personal preference as IDE is, why not this, right? Selecting proper language seems to me deeper question.
Bunch of links to get context why I love Python:
This hopes be discussion on facts, not flamewar. So I try my best, but cannot be hold responsible for others. It is also possible that this will earn me ban. We will see. Last edited by pmasiar; October 26th, 2007 at 04:26 PM.. Reason: added B.E. blogs about typing |
|
|
|
|
|
#2 |
|
Day Old Decaf
![]() Join Date: Jun 2006
Location: CT, USA
Beans: 5,268
Ubuntu 6.10 Edgy
|
Re: Why to love/hate Python
(In response from post about C
[C/Java has more resources than Python online] One of the reasons (at least for python and for me) might be that I needed substantially less resources to get started with Python than with Java. Java is just so byzantine complicated. My "Java in a nutshell, 1.3" has 646 pages of standard format, "Python pocket reference" (2.4) has 148 pages, and pages are half the size. You need many more books to get reasonable comprehension of Java than for Python. Last edited by pmasiar; October 15th, 2007 at 01:48 PM.. |
|
|
|
|
|
#3 |
|
Tall Cafè Ubuntu
![]() Join Date: Oct 2006
Beans: 2,678
Ubuntu 7.10 Gutsy Gibbon
|
Re: Why to love/hate Python
I like Python because I came into it from the world of Assembly, C, and C++. After that, you can really appreciate the beauty and simplicity of Python and you will notice a remarkable increase in your productivity. Another thing I like about Python is that you don't have to spend hours searching the web for libraries, Python comes with almost everything, and what it doesn't come with is always easy to find.
An even bigger reason why I'm so interested in Python is that my goal is to be hired at a smart and productive company like Google, who uses Python in applications such as Google Maps, Gmail, YouTube, and even in parts of its search engine. If the geniuses at Google think it's a good language, then it's probably a good language.
__________________
|
|
|
|
|
|
#4 |
|
Way Too Much Ubuntu
![]() Join Date: Sep 2006
Location: Germany
Beans: 251
Ubuntu 9.04 Jaunty Jackalope
|
Re: Why to love/hate Python
This thread shouldn't be so prickly. I can only offer you an opinion. After 10+ years with all the Java updates, I can tell you I found Python very refreshing getting back to modules. Java is monolithic. We can make java code work and then discover it was a freak that the code was working. With java it could mean a total redesign of legancy code to bridge into new java APIs. I got tired about that part. Java is template coding. Set up a template, customize it, set up a template, customize it, set up...
Python, on the other hand, and as far as I'm concerned, never was documented. The O'Reilly series of Python titles come a long way showing pieces of interesting cause and effects. The code in the books make perfect sense. And then you discover how tricky dynamic typing can be doing your own stuff. What works as a Python module takes a lot more thought when you convert such code into a class. The most wonderful discovery for me about Python was making the Linux terminal echo commands from Python statements. I found an easy way to process hundreds of digital photos using Python with ImageMagick (and I don't have to use ImageMagick's internal script engine). Ubuntu has capabilities like ImageMagick already built into it. Starting a discussion about Python using those capabilities would be useful. Very userful. Java with its JRE can enhance Linux. Linux can NOT do audio without add-on hardware. So, as I make more progress with Python, I plan to see what Jython can do with Java ME2, and Java Media Framework. So, Python. If it's just for fun.
__________________
"You don't do art because you want to, no, you do art because you have to." -- M. Buonarroti |
|
|
|
|
|
#5 | |
|
First Cup of Ubuntu
![]() Join Date: Aug 2007
Beans: 11
|
Re: Why to love/hate Python
Quote:
In fact, Python in a Nutshell has 654 pages. Don't get me wrong, I use both python and java quite often and like bits of both languages. It's just not a fair comparison. |
|
|
|
|
|
|
#6 |
|
Iced Blended Vanilla Crème Ubuntu
![]() |
Re: Why to love/hate Python
Nothing wrong with Python per se really, I use it actively myself... but I am not a true believer. Python has this perpetual feel of enforcing training wheels on you, while for some reason it is called a "freedom language". The fact and the way that Python enforces style seems to fly in the face of the idea that "programmers are consenting adults".
Now... style is a good thing, and I am slightly partial to languages that are "pure" stylistically as that often produces a kind of economy into the language. You know how things work because things are consistent. It's just that Python seems to enforce stuff in the wrong places, and sometimes the wrong way, despite supposedly being flexible. It's hard to put my finger on it what it is about, but sometimes Python feels petty for no reason Of course, my primary complaints are the old ones... semantic whitespace is still awful, some syntactic constructs are missing or have to be implemented in an ugly way just because "they can be done otherwise", Python's classes feel a bit like an afterthought... yes, I don't like explicit self. I never rename "this" in other languages either. I'm sure the idea behind this is the ability to more easily just tack a function onto an object, or something like that... but Python's classes are so amorphous already that soon we'd just as well move back to procedures manipulating tuples But, they are of course nitpicks. Fun ones, for sure, programming language differences are wonderful fodder for religious disputes...
__________________
Unmoderated, smart programming discussion with pmasiar, LaRoza and others here. | #ubuntu-programming on FreeNode |
|
|
|
|
|
#7 | |
|
Day Old Decaf
![]() Join Date: Jun 2006
Location: CT, USA
Beans: 5,268
Ubuntu 6.10 Edgy
|
Re: Why to love/hate Python
Quote:
To be fair, I never seen any "pocket size" reference book for java. P-N book has much more detailed info that J-N (I just opened in via Safari), with details and comments, multiple lines per item. Big part of P-N is just reprint of standard docs, thats why I like "pocket" book more, because lot of thought went in to compressing the info, make it more succinct, without withholding important parts. |
|
|
|
|
|
|
#8 |
|
Gee! These Aren't Roasted!
![]() Join Date: Aug 2005
Beans: 179
Ubuntu 9.10 Karmic Koala
|
Re: Why to love/hate Python
To be fair, though I'm really more into C due to my job relying on it, I really am interested in learning Python. In fact, I've downloaded some reference manuals and the Dive into Python book from the documentation thread and am planning on looking at it tonight.
I don't expect it to replace C for me, but I really am looking for an easy to use scripting language. I've tried to learn Perl hundreds of time it seems. While I always end up with something that works, I think the old acronym for perl (Perl = Pathologically Eclectic Rubbish Lister) is somewhat true. I can never actually wrap my head around it enough to not have to go back to basics every time I go to maintain one of the scripts I've written in it. From what I've seen of Python, it's the perfect fit for this task. I do have to say though -- the use of syntactic whitespace scares me just a little... |
|
|
|
|
|
#9 |
|
Tall Cafè Ubuntu
![]() Join Date: Oct 2006
Beans: 2,678
Ubuntu 7.10 Gutsy Gibbon
|
Re: Why to love/hate Python
It scared me too, but now when I have to program in C or C++ I'm always thinking "What? You mean I actually have to type all these stupid semicolons and brackets?". Indentation is a must for good code anyway, just think of Python as not having semicolons or brackets.
__________________
|
|
|
|
|
|
#10 | |
|
Gee! These Aren't Roasted!
![]() Join Date: Aug 2005
Beans: 179
Ubuntu 9.10 Karmic Koala
|
Re: Why to love/hate Python
Quote:
|
|
|
|
|
| Bookmarks |
| Tags |
| flamewar, python |
| Thread Tools | |
| Display Modes | |
|
|