ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I myself have used Python and practically find it extremely productive because you can achieve a lot with less code. In my practical experience, the code I write in Python is far less error-prone than code I've written in C, C++ or any other language. It just expresses some things logically better than other languages.
Python is an interpreted language, but your development time is faster and you end up writing neater and more logical code. And right now, I find that it has a lot of extensions that really make it a richly productive programming tool.
Sure, the enforced whitespacing and indentation is a turn off for some, but actually I've developed a taste for it.
Last edited by vharishankar; 07-01-2009 at 11:06 AM.
The original question was ..."why was Python voted the language of the year?"
Let's stay on topic.
No, the original question (from page 1) was:
"What makes python so good and popular??"
...to which my response-
"The answer: Because Google is pushing it. IMHO, it's not good, it's lacking.
The question: What makes python so good and popular??"
...was right on topic.
That may be your opinion, but that doesn't make it the correct or wrong answer or perfect on-topic. Everybody is entitled to their opinions and every reply here has debated the merits/demerits of python which are relevant to the issue.
You cannot have a thread on "WHY WAS X VOTED APP OF THE YEAR?" without discussing the merits and demerits of that app.
Last edited by vharishankar; 07-04-2009 at 10:36 PM.
That may be your opinion, but that doesn't make it the correct or wrong answer or perfect on-topic. Everybody is entitled to their opinions and every reply here has debated the merits/demerits of python which are relevant to the issue.
You cannot have a thread on "WHY WAS X VOTED APP OF THE YEAR?" without discussing the merits and demerits of that app.
Point 1: Well, that last statement (to which my last reply was referring to) was:
#45
jagooch
LQ Newbie
Registered: Sep 2008
Posts: 4
Thanked: 1
The original question was ..."why was Python voted the language of the year?"
Let's stay on topic.
Which it was not, if you read the first post on this thread, you will see that his question was: "What makes python so good and popular??"
I was correcting jagooch's post.
POINT 2: As for my statement that Python is really popular now due to Google pushing it... Okay, if you believe that I am wrong, prove it. Don't just say that I am wrong.
I wasn't saying it was wrong. I was saying it is a matter of opinion. As far as I'm concerned, Python has been popular in the *nix community to a large extent even before google's massive push.
Of course, google are pushing Python. That has a lot to do with Python's merits and not the other way round. It's obvious that a commercial entity of the nature of google wouldn't invest heavily in a technology like Python without seeing the benefits accrued from using it.
So the principle of "Res Ipsa Loquitur" applies here. The burden of proof is transferred to the other party.
Last edited by vharishankar; 07-05-2009 at 10:00 PM.
I wasn't saying it was wrong. I was saying it is a matter of opinion. As far as I'm concerned, Python has been popular in the *nix community to a large extent even before google's massive push.
Of course, google are pushing Python. That has a lot to do with Python's merits and not the other way round. It's obvious that a commercial entity of the nature of google wouldn't invest heavily in a technology like Python without seeing the benefits accrued from using it.
So the principle of "Res Ipsa Loquitur" applies here. The burden of proof is transferred to the other party.
Nothing is obvious.
I know another commercial entity which used to have its own HDL simulator and its own circuit simulator.
The commercial entity realized in the end that it would be better to use industry standard tools/languages - for various reasons.
I did read myself the blog of that Google Python advocate - his advocacy was to big extent based on his dislike of Perl.
From time to time in various forums Python advocates (some/most of them simply not knowing Perl well enough or at all) try to show how good is Python, but after my "coaching" they now at least ask whether a feature they like in Python exists in Perl.
The last feature I remember is array with fixed indexes - it happens to be that in Python by default that's the case, while in Perl by default arrays have unbound upper index.
Well, Perl has a module which allows to introduce upper array index bound (of course, this is trivially possible through "Tie" mechanism).
Again, so far I haven't been demonstrated a Python feature which doesn't exist in Perl, i.e. I see no practical reason for myself to switch.
It might not be obvious to you, but it puts the burden of proof on your side, because Google, after all, make much bigger decisions than people like you and me and have a greater impact on technology adoption than you or me. It's all very well to condemn or criticize google, but the fact remains that google have adopted Python and Python IS a solid, proven language of choice of general purpose high-level development, like it or not.
I myself never found the need to use Perl, but I have a strong C/C++ background with knowledge of Java, PHP, etc. etc. Python looks the most elegant of these languages once you get past its syntactical quirks (as compared to other languages).
Perl code almost every time I look at it, looks a lot like assembly code on steroids. Maybe the fault lies with the developers, but I've never seen one Perl script that I could make out fully. Its reputation for being hard and tough is not unfounded, even if it might be untrue. Python, on the other hand, has been designed to be elegant from the ground up and doesn't expose so many features as Perl, but it is a RAD scripting language that is about as extensible as Perl is with modules.
Yes, I am aware that it's syntax is similar to C, but that's where the comparison ends.
Last edited by vharishankar; 07-06-2009 at 06:26 AM.
It might not be obvious to you, but it puts the burden of proof on your side, because Google, after all, make much bigger decisions than people like you and me and have a greater impact on technology adoption than you or me. It's all very well to condemn or criticize google, but the fact remains that google have adopted Python and Python IS a solid, proven language of choice of general purpose high-level development, like it or not.
I myself never found the need to use Perl, but I have a strong C/C++ background with knowledge of Java, PHP, etc. etc. Python looks the most elegant of these languages once you get past its syntactical quirks (as compared to other languages).
Perl code almost every time I look at it, looks a lot like assembly code on steroids. Maybe the fault lies with the developers, but I've never seen one Perl script that I could make out fully. Its reputation for being hard and tough is not unfounded, even if it might be untrue. Python, on the other hand, has been designed to be elegant from the ground up and doesn't expose so many features as Perl, but it is a RAD scripting language that is about as extensible as Perl is with modules.
Yes, I am aware that it's syntax is similar to C, but that's where the comparison ends.
I saw unreadable Python code - because of the code author.
First and foremost, no language can save code in case of senseless names.
Elegance of Python is questionable - frequent usage if __self__ is an example.
Elegance of Python is questionable - frequent usage if __self__ is an example.
if that's the only reason you think Python elegance is "questionable", you haven't seen anything yet. "self" is just a convention. one can give it an alias if one wants. Understanding why "self" is like that, requires you to know Python's OO internals, which i am sure you are not interested.
if that's the only reason you think Python elegance is "questionable", you haven't seen anything yet. "self" is just a convention. one can give it an alias if one wants. Understanding why "self" is like that, requires you to know Python's OO internals, which i am sure you are not interested.
AFAIK, according to Larry Wall, Perl 5 OO model was stolen from Python.
So, you are probably right - since I have some idea about Perl 5 OO internals, I am not that interested in Python OO internals.
The point, though, was frequent use if classes in Python.
The funny thing about classes in any OO language is that class names are global entities, so if there are too many of (top level) classes, there is a big(ger) chance of name collision.
...
Maybe later I'll write a gtk+ Perl bindings code - a full working example, and will ask to translate it into Python - to show the weak spots in Python and thus why one might decide to switch to Perl.
Maybe later I'll write a gtk+ Perl bindings code - a full working example, and will ask to translate it into Python - to show the weak spots in Python and thus why one might decide to switch to Perl.
That may be your opinion, but that doesn't make it the correct or wrong answer or perfect on-topic. Everybody is entitled to their opinions and every reply here has debated the merits/demerits of python which are relevant to the issue.
You cannot have a thread on "WHY WAS X VOTED APP OF THE YEAR?" without discussing the merits and demerits of that app.
Yes you can.
"Can it do all the thinks Java and C++ can??"
Python can thinks all it wants, but two heads are better than one, so unfortunately, it cannot keep up with the combined processing power of Java and C++.
it cannot keep up with the combined processing power of Java and C++.
That maybe true, especially for C++ vs. perl/python. But certainly both perl and python beat both java and C++ in development effort. And C++ and java are certainly off-topic here btw.
I think between Perl and Python is merely a matter of taste. Or what you happened to learn first. No need to switch for either side IMHO. Both are in the "same market" of application area.
My taste is python (cleaner code), but I do see some merits of perl over python (swiss army knife, quick hacks, replace awk, sed, cut etc).
I was doubting quite long when deciding which of the two to learn. I choose python (it looked easier) and see no need to switch. If I had chosen perl, most probably I wouldn't see any needs to switch either.
The "discussions" about which is "better" are only kept alive by testosteron :-)
During the course of any particular workday, I might work on (or look at...) code in three or four different programming languages. Including Python. From this perspective, I think I can make a few good points...
In the real world, there is seldom if ever a practical reason to write a stand-alone executable program in "C" or even "C++," unless your goal is to produce a free-standing program such as ... say ... "yet another language."
Scripting languages are one of the most practical notions ever invented. Learn 'em all.
There is never (that's my opinion and I'm stickin' to it...) any practical reason to write anything in "bash scripting," which was never designed to be what all of these scripting languages were designed to be.
There is seldom if ever a practical reason to quarrel religiously about scripting languages, even though plenty of people do.
Once a programming language reaches "critical mass," there is no turning back. Thousands of lines of production software have been written in it, and tediously debugged, and neither that software nor the language itself is ever going to be "rewritten." The more languages you know, the more indispensible you can make yourself. Also, you can make smarter decisions about what language to use on your next project... and why.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.