Click to See Complete Forum and Search --> : Python vs. Perl
Dun'kalis
11-16-2002, 01:29 AM
Well? I've tried learning Perl, but it looks like a bunch of noise to me. Too strange of syntax. Python is very nifty, can be used for complete applications usually left to C/C++, while Perl can replace sh and some small C programs.
If you haven't given Python a shot, make sure you do. Its a logical language that barely requires comments or explanation.
And whitespace requirements :D
bskahan
11-16-2002, 01:37 AM
ooh, my second favorite flame war (after vim vs. the rest)
here's a second for python. Its an incredibly intuitive scripting language that can do everything perl can with a much more understandible syntax. perl programs could be made legible and maintainable, but lets face it most people don't. out of the mtowtdi people tend to pick the easiest not the easiest to maitain.
EscapeCharacter
11-16-2002, 02:48 AM
Originally posted by bskahan
ooh, my second favorite flame war (after vim vs. the rest)
perl programs could be made legible and maintainable, but lets face it most people don't.
ive tried to make one legible but after about 500 lines perl starts naturally getting really ugly. i havent done any code in python but i hear its a OO language and i know alot of people that love it so i may give it a try someday
ScRapZ_1
11-16-2002, 07:09 AM
Python has my vote :D
I havnt actually coded in Perl, but I have had to to a bit of debugging, and generally going through it and having a look. It makes my head spin, its so goddamn messy! It looks like one of those languages where when you write it, its intention is to make it harder for someone else to read. I'm sure Perl has its benefits, but I like how everything in Python is set out nicely, and its easy to read/understand.
:cool: Python si teh win! :cool:
TTFN,
Scrapz :p
x_Ray
11-16-2002, 07:33 PM
Another vote for python, although I haven't really used perl much so I may be a little biased.:)
Dun'kalis
11-16-2002, 07:56 PM
I have a friend who thinks Perl is elegant compared to Python. Granted, he doesn't like the Python syntax, but how can you like Perl!
Its almost as hard to read as Lisp!
mr orion77
11-16-2002, 08:16 PM
but what are the possibilities with both.? python has some nifty modules for gtk etc. how far can it go?
perl is supported even though its ugly.
swangods
11-16-2002, 08:53 PM
I recall a post somewhere that was quoted and responded as such:
<quote>
User1: can python do <enter desired function here>
</quote>
User 2: yes! now get on with the question
All in all, that sums it up. Python can do just about anything you would do in C, C++, Delphi, etc. And it does it cleanly. Don't get me wrong... I like braces. But Python's use of whitespace makes for nicely formatted code that's easy and logical to follow. The reason people pay money for C++ IDEs is because the good ones highlight your matching braces (good for nesting). The multitude of add-in modules for Python make it fantastic for future expandability.
Perl, by the same token, is just as powerful as Python. Indeed, it's inarguably more supported on a commercial level. Doubt this statement? Just go to a typical bookstore and check out the amount of literature on Perl, and compare it to Python. Still doubting? Take a look at commercial webhosters and ISPs. See which ones offer Perl support for webhosting, and compare it to how many offer Python support.
The numbers aren't pretty for the Python crowd. But, I still like it. I'm hardly anything more than an amateur with either one, but I do have a vote to cast, both here and in the world in general.
bskahan
11-16-2002, 09:27 PM
Originally posted by Dun'kalis
Its almost as hard to read as Lisp!
(((setq) '(lisp '("the bane of all that is good"))))
ok so maybe i threw in some extra ()s but I figure its better to err on the side of more ;)
Dun'kalis
11-17-2002, 12:29 AM
Python isn't used on the web side. Perl is at least 20 years old. Python is about 10.
Python has more functionality, its an easy to learn language (don't tell me VB is easier for RAD), has wxWindows for great widget support, and is easily extensible (a program I wrote has about 10 files, and the main one just calls functions from the rest...)
swangods
11-17-2002, 10:46 AM
Originally posted by Dun'kalis
Python isn't used on the web side.
Well, it isn't used as much as Perl, but it is used. It can be used as a full-fledged CGI scripter. Support for it, however, is a bit lacking.
its an easy to learn language (don't tell me VB is easier for RAD),
Depends on who's doing the writing. The main advantage that VB has over its competitors is the fact that it comes "out of the box" with all of its functionality being built into the main function set. For less experienced programmers, or even just for those who are really pressed for deadlines, it can be easier to deal with the full package- intergrated environment with distributable compiler, inline help, easy-to-understand function nomenclature, not having to do "import" or "use"... etc.
This isn't to say Python isn't easy! Just sticking up for VB =)
Also, I read somewhere a while ago that there might be a module for integrating Python with the Windows Script Host? I know there is functionality for Perl with WSH and WMI... but I haven't heard about the Python bit in a while. Anybody have any info?
swangods
11-17-2002, 10:51 AM
Ah, found some stuff:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65108
http://www.python.org/windows/win32/
http://starship.python.net/crew/mhammond/