LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-15-2009, 02:16 AM   #16
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454

Quote:
Originally Posted by ghostdog74 View Post
they have reasons for this move. If you find in the internet, there are many discussions on this. What i see is, Python 2.x is still pretty much relevant in the long term. Most of the real world problems can be solved without using Python 3. If an environment doesn't yet have Python 3 and is considering using it and if one doesn't foresee using it to run older Python code, then one might go for it. Otherwise, sticking with Python 2.x is still alright.
Oh yeah, Perl moved from 4 to 5 more than 10 (15 ?) years ago.

I'm not 100% sure, but it looks like Python 2 -> 3 transition is approximately as Perl 4.5 (there was no Perl 4.5 in reality) to Perl 5 transition.

Well, as I wrote above, Python is finally catching up.
 
Old 02-15-2009, 05:53 AM   #17
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by nesrail View Post
I just saw that Python is "the programming language of the year".
I study Java (for 2 weeks now) at my school and I think its good enough.
What makes python so good and popular?? Can it do all the thinks Java and C++ can??
Use programming language you like. Period. Polls about "programming language of the year" are waste of time.
 
Old 02-15-2009, 06:52 AM   #18
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Sergei Steshenko View Post
Oh yeah, Perl moved from 4 to 5 more than 10 (15 ?) years ago.

I'm not 100% sure, but it looks like Python 2 -> 3 transition is approximately as Perl 4.5 (there was no Perl 4.5 in reality) to Perl 5 transition.

Well, as I wrote above, Python is finally catching up.
I really don't understand your agenda. What are you trying to prove?
 
Old 02-15-2009, 07:51 AM   #19
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by ghostdog74 View Post
I really don't understand your agenda. What are you trying to prove?
In this topic I join the OP in my inability to understand why Python was called "language of the year".

I am also trying to show that Python is slowly getting features Perl (for example) already has - for more than 10 years.

As well as, say, much newer Lua, i.e. Lua has the features, Python is on the way.

People compare languages, so the thread has some links to info on them.
 
Old 02-15-2009, 08:10 AM   #20
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by Sergei Steshenko View Post
In this topic I join the OP in my inability to understand why Python was called "language of the year".
It was nicely said that "community polls doesn't replace thinking".
Python was called "language of the year" because most people that voted selected this option (for whatever reason). Which in reality doesn't mean anything, especially if you take into account small number of voters.

P.S. "Member choice award" is the only feature on LQ I seriously dislike right now.
 
Old 02-15-2009, 04:42 PM   #21
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by H_TeXMeX_H View Post
One thing that bothers me about python is the move to 3.0, which is NOT backwards compatible.
I consider that a pro for python. The python developers do not hesitate to improve things and make it more future-proof, just because it would break backwards compatibility. They do that in a major release and announce it and document it very well. Why leave out improvements (or even fail to fix historic mistakes) just for the sake of backwards compatibility and drag the burden till the end? Also note that 2.x code will still be runnable for years to come.

Quote:
Originally Posted by H_TeXMeX_H View Post
It's true that it's a good language to learn programming with, and I think it's a very readable language much like ruby, it's almost as if you can speak it like a natural language. But, other than that, not too much benefit over Perl.
Other than that? "That" is already quite some benefit IMO!
 
Old 02-15-2009, 06:08 PM   #22
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Sergei Steshenko View Post
In this topic I join the OP in my inability to understand why Python was called "language of the year".

I am also trying to show that Python is slowly getting features Perl (for example) already has - for more than 10 years.

As well as, say, much newer Lua, i.e. Lua has the features, Python is on the way.

People compare languages, so the thread has some links to info on them.
well seriously, if i want to compare Python with Perl i can tell you many things which Perl is "inferior" as far as to a human being concerned but that's not my intention. if you can sit and spend even 1 day seriously learning about Python, you can find out the answer yourself on why its "popular" nowadays.
 
Old 02-16-2009, 04:44 AM   #23
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by Hko View Post
I consider that a pro for python. The python developers do not hesitate to improve things and make it more future-proof, just because it would break backwards compatibility. They do that in a major release and announce it and document it very well. Why leave out improvements (or even fail to fix historic mistakes) just for the sake of backwards compatibility and drag the burden till the end? Also note that 2.x code will still be runnable for years to come.
Well, I realize that once in a while it has to be done, that backwards compatibility has to be broken in order to move ahead. But, I hope they don't do it too often otherwise it'll be a nightmare for devs constantly worrying about having to port python programs to the next version which will not be backwards-compatible. So, I mean, they can do it, but try not to do it too often.
 
Old 02-16-2009, 07:06 AM   #24
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Interestingly, Perl is having almost the opposite problem of Python in terms of backwards compatability. There are some rumblings about legacy features that continue to be supported in Perl and whether they should be phased out. Take a look for example at many of the posts here: http://www.modernperlbooks.com/mt/
 
Old 02-17-2009, 12:34 AM   #25
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by ghostdog74 View Post
well seriously, if i want to compare Python with Perl i can tell you many things which Perl is "inferior" as far as to a human being concerned but that's not my intention. if you can sit and spend even 1 day seriously learning about Python, you can find out the answer yourself on why its "popular" nowadays.
Well, Perl quite well implements "do what I mean" principle.

So, for starters, please translate the following into Python:

Code:
sergei@amdam2:~/junk> cat -n md_array.pl
     1  #!/usr/bin/perl -w
     2
     3  use strict;
     4
     5  my @array;
     6
     7  $array[0][1][2] = 123;
     8  $array[3][4][5] = 456;
     9
    10  warn "\$array[0][1][2]=$array[0][1][2]";
    11  warn "\$array[3][4][5]=$array[3][4][5]";
    12
    13  warn "\$array[3][4]=$array[3][4]";
sergei@amdam2:~/junk> ./md_array.pl
$array[0][1][2]=123 at ./md_array.pl line 10.
$array[3][4][5]=456 at ./md_array.pl line 11.
$array[3][4]=ARRAY(0x8194ddc) at ./md_array.pl line 13.
sergei@amdam2:~/junk> cat -n md_hash.pl
     1  #!/usr/bin/perl -w
     2
     3  use strict;
     4
     5  my %hash;
     6
     7  $hash{foo}{bar}{doo} = 123;
     8  $hash{goo}{dah}{bah} = 456;
     9
    10  warn "\$hash{foo}{bar}{doo}=$hash{foo}{bar}{doo}";
    11  warn "\$hash{goo}{dah}{bah}=$hash{goo}{dah}{bah}";
    12
    13  warn "\$hash{goo}{dah}=$hash{goo}{dah}";
sergei@amdam2:~/junk> ./md_hash.pl
$hash{foo}{bar}{doo}=123 at ./md_hash.pl line 10.
$hash{goo}{dah}{bah}=456 at ./md_hash.pl line 11.
$hash{goo}{dah}=HASH(0x8194e04) at ./md_hash.pl line 13.
sergei@amdam2:~/junk>
, and then we'll talk about human being concerned.
 
Old 02-17-2009, 02:43 AM   #26
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by Sergei Steshenko View Post
So, for starters, please translate the following into Python:
Yes, it is known python lacks sparse arrays while perl does support them.

Are the python and perl supporters now going to exchange pieces of code that is awkward, ugly, or difficult in the other language in turn? Hope not.
 
Old 02-17-2009, 04:07 AM   #27
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Hko View Post
Yes, it is known python lacks sparse arrays while perl does support them.

Are the python and perl supporters now going to exchange pieces of code that is awkward, ugly, or difficult in the other language in turn? Hope not.
It wasn't only about sparse arrays specifically, it was about presence/absence of references autovivification, and, as a consequence, the need to write extra code.

So, "as far as to a human being concerned", in Python I need to write more code - which doesn't make it a more attractive language for me.


The point is presence/absence of features.

I'm interested to see a feature in Python Perl lacks.
 
Old 02-17-2009, 04:18 AM   #28
charlitos
Member
 
Registered: Feb 2009
Posts: 51

Rep: Reputation: 16
It all depends on what you want to do, some projects require the use of a real programming language, some others can be done using some scripting language. Python is extremely easy to use, let alone to talk about the flexibility of its data structures. Its useless to start a war Perl VS Python or Java vs Python, first cause Java, Python and Perl have something than the other lacks, they have their own advantages. Programming/Scripting Languages are just tools. As a programmer you have to be able to recognize who is good for what, and not to get sticked to a single concept, because that is just in my opinion being stubborn.
 
Old 02-17-2009, 04:48 AM   #29
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Quote:
Originally Posted by Sergei Steshenko View Post
I'm interested to see a feature in Python Perl lacks.
Sorry, I really can't help you with that. I don't know perl at all.
But I suspect "readable code" would be one.
 
Old 02-17-2009, 05:12 AM   #30
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by charlitos View Post
It all depends on what you want to do, some projects require the use of a real programming language, some others can be done using some scripting language. Python is extremely easy to use, let alone to talk about the flexibility of its data structures. Its useless to start a war Perl VS Python or Java vs Python, first cause Java, Python and Perl have something than the other lacks, they have their own advantages. Programming/Scripting Languages are just tools. As a programmer you have to be able to recognize who is good for what, and not to get sticked to a single concept, because that is just in my opinion being stubborn.
OK, then what about Lua ? What does Python have Lua lacks ?

I do not write in Lua, I just read about it here and there - seems to be a nice languagse - it has closures and anonymity, as well as an OO model.

Considered to be light.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Review: Programming in Python 3: A Complete Introduction to the Python Language LXer Syndicated Linux News 0 01-26-2009 04:50 AM
python update - Unable to load GTK2 Python bindings: No module named gtk itpedersen Linux - Software 2 10-03-2008 03:44 AM
LXer: Charming Python: Python elegance and warts, Part 2 LXer Syndicated Linux News 0 08-31-2007 08:40 AM
LXer: Move to python 2.4 / Changing the packaging style for python packages LXer Syndicated Linux News 0 06-13-2006 07:54 PM
python problem - compiled from source - python -V still showing old version txm123 Linux - Newbie 1 02-15-2006 11:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration