LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 07-29-2006, 10:50 AM   #1
yenonn
Member
 
Registered: Feb 2003
Location: Malaysia
Distribution: Redhat 8.0, 9, Slackware 9.1
Posts: 511

Rep: Reputation: 30
perl vs python


hi all,

among perl and python which one is the leading trend of programming. can anyone tell me? i am planning to choose one of the languages. please convince me. thanks
 
Old 07-29-2006, 11:04 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,242
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
On my opinion you should not look at the popularity or at the current trend of the language. Make a research of the two languages then choose one according to what you think will be really useful to your programming needs or purposes.

Mostly it's just depends on the type of programs you're planning to make. Sometimes you can even combine both languages if you like. I know one popular project that does this. But I don't recommend doing that because it's better to focus first on one language then got to the next.

Last edited by konsolebox; 07-29-2006 at 11:07 AM.
 
Old 07-29-2006, 11:53 AM   #3
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 40
konsolebox is absolutely right about the importance of choosing a language that's relevant to you and what you want to do. And I'd say, just learn both of them! Like all programming languages, each has its strengths and weaknesses. And you'll learn more about programming in general if you pick up both of Perl and Python.

But from what I see, Python is more mainstream and commercially-accepted than Perl. Python is more suited for programming "in the large" because of easier modularisation and OO support. It's also a heck of a lot easier to read than Perl. Plus Python code can integrate with Java through the Jython implementation. So I think Python is more along the lines of what big businesses want their programmers to be able to do.
 
Old 07-31-2006, 01:45 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994Reputation: 1994
OTOH, Perl has been around longer, has CPAN (search.cpan.org) and is avail on many OSes ;-)
your choice ...
 
Old 08-01-2006, 12:33 AM   #5
ckin2001
LQ Newbie
 
Registered: Jul 2006
Location: Chambana
Distribution: debian
Posts: 17

Rep: Reputation: 0
Perl is faster at the expense of being harder to learn. The only reason it's hard to learn is that there are 20 ways to do many things, and googling for help will often lead you to spend time deciphering the persons code that you are studying besides actually studying what it does. Python does not have this problem, and almost all python code looks alike.

If you have programmed C before, I'd say perl. Python is a lot more beginner friendly, though.
 
Old 08-01-2006, 05:17 AM   #6
greeneagle
Member
 
Registered: Dec 2004
Location: Dublin Ireland via Cobh, Limerick.
Distribution: RedHat, Suse, Ubuntu.
Posts: 33

Rep: Reputation: 16
ESR had an interesting perl and python story: http://www.linuxjournal.com/article/3882 "Why python?"
(I just see where I probably came across that first: http://www.python.org/doc/intros/)

The history of perl and python is a bit interesting and it shows
through. Python syntax and features were very deliberately designed and made clean. And I think that works and does make it immediately easier. Perl evolved. I see many similarities with perl and python. Especially in that they are easily extendable with libraries and the communities in both cases have built up a large set of useful software.

http://www.python.org/doc/essays/foreword/

http://www.perl.com/pub/a/1997/wall/keynote.html
[ ... "Was it all an accident?" ... "Well, kinda sorta." ... ]
warning: severe paraphrasing, but ...
I do perl best. But it suits what I use it for. Sys-admin scripts at home, web backend, software test & dev, any other kind of messing.

I don't have that much experience with python,
I have played with it a little.
To me it looks like python is quite popular among the scientific community. Numeric package for Mathematics seems to be a requirement of some interesting applications.

So like the others say, it depends what you want to do.
A big advantage to either language is the ability to use others work and build on it. And in different areas one language is used more than the other.
 
Old 08-01-2006, 05:44 AM   #7
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,242
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
I read ESR's story before when I was searching for some info about python. His story is simple yet quite shocking to scripting community. I'll bet 10-30% of perl users tried python because of that. That doesn't include myself though.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python or Perl drdroid Programming 29 12-22-2006 09:54 AM
Perl or Python JJX Programming 4 04-17-2006 02:42 PM
Python or Perl? Boby Programming 2 06-12-2005 10:54 AM
Perl or Python JJX Programming 6 10-27-2004 03:58 AM
Perl or Python ! linuxlover1 Programming 13 04-19-2004 07:33 AM


All times are GMT -5. The time now is 05:10 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration