5 ms·
My reason for using Perl is to escape from OOP. All of the modern mainstream programming languages, C++, Java, C#, Python, Ruby, JavaScript, etc are all strongl
by jhuni 16y ago
My reason for using Perl is to escape from OOP. All of the modern mainstream programming languages, C++, Java, C#, Python, Ruby, JavaScript, etc are all strongly OOP.
On the other hand, Perl is very much a procedural langauge. Besides Perl code that is written in a procedural style, many Perl modules are written in C which is a strictly procedural language.
There is Moose for OOP stuff, but that is just added onto the language as an afterthought, and many libraries don't use it so we can at least say that Perl is less OOP then all of the other mainstream languages.
I don't know what it is, I just hate OOP. It seems absolutely revolting to me, so I stuck with procedural languages. Now I have found something I like even better: functional programming, so now I use languages like Lisp and Haskell.
As for Python, the only good features in that language: lambda, map, reduce, and filter were added by a Lisp hacker. Everything else in the language is inefficient scripting crap.
- kbd 16y ago> As for Python... Everything else in the language is inefficient scripting crap. Would you elaborate on how this applies to Python and not Perl?
- jhuni 16y agoThe difference is that Perl got its good features from non-Lisp hackers that copied Lisp. Python got its good features directly from Lisp hackers. I am quite certain of this because I doubt there are any Lisp hackers out there that would contribute to a language that has a periodic table of unreadable operators http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic%20Table%20of%20the%20Operators%20A4%20300dpi.jpg http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic...
- berntb 16y agoSigh, another language war troll that don't know that table is for Perl 6 and not for Perl 5... :-( Can't you guys at least vary your garbage? (Assuming it isn't one guy with multiple accounts everywhere.)
- jhuni 16y agoI am very aware of the differences between Perl 5 and Perl 6. Perl 5 was a tool that was very useful for obfscuated code contests such as this one: http://perl.plover.com/obfuscated/ http://perl.plover.com/obfuscated/ The new version of Perl, Perl 6, introduces new features to Perl 5 that will make it an invaluable tool for obfuscated code contests such as unicode characters (you thought you had to decipher the meaning of only 256 characters? Think again) and meta-operators. Perl 6 obsoletes Perl 5 for these contests, even brainfuck is no longer a useful tool for obfuscated code contests, because it is no match for Perl 6. Lisp isn't very useful for these obfuscated code contests, but if you are interested in actually writing computer programs then its worth looking into.
- berntb 16y agoAnd now this new account claim, that if you can misuse a tool, it is bad (please hand over all your kitchen knives). >>Lisp isn't very useful for these obfuscated code contests I quite like Lisp. I still am quite certain that nice macro system can be used in many very interesting ways... I have no problem with language war trolls either, as long as they stay at 4chan, or where ever they come from...
- chromatic 16y agoPython got its good features directly from Lisp hackers. Perl 5 has more Lisp features than Python does.
- burgerbrain 16y agoPerl is terse, and fast. The speed difference between perl and python might mean peanuts these days, but it's still true more often than not. Perl programs kick off far faster for instance (`time perl < /dev/null` `time python < /dev/null`) which can become important in some (not so hard to imagine) situations. Perl also functions far better as a systems scripting language. Compare filtering a perl string through a Unix filter (perhaps an Awk program, another perl program, whatever) to the same thing in python. The difference is night-and-day.
- BCM43 16y ago$ time perl < /dev/null real 0m0.033s user 0m0.004s sys 0m0.000s $ time python < /dev/null real 0m0.017s user 0m0.004s sys 0m0.012s $ time perl < /dev/null real 0m0.002s user 0m0.004s sys 0m0.000s $ time python < /dev/null real 0m0.017s user 0m0.016s sys 0m0.000s $ time perl < /dev/null real 0m0.002s user 0m0.000s sys 0m0.004s $ time python < /dev/null real 0m0.017s user 0m0.008s sys 0m0.008s That's interesting. The first time perl is a lot slower, but further runs are a lot faster, while python starts medium and stays there. I tested this on more than one computer and results followed the same pattern.
- ay 16y agoI think the delay is the seek time of your disk the first time it loads perl; and the python was already cached. (OT: the Lua startup time is half of Perl's)
- lawnchairlarry 16y agoEven so, with either one at such negligible speeds, that has to be about the worst justification for any language I've heard.