4 ms·
Those are both excellent examples. One modifies the core language syntax to allow for writing tests in a cleaner and easier way. The other one modifies the lang
by ironcamel 14y ago
Those are both excellent examples. One modifies the core language syntax to allow for writing tests in a cleaner and easier way. The other one modifies the language to make writing OO code in a new way, one that will be familiar to Java developers. I don't know of very many languages that allow developers to modify the core language via 3rd party modules. That's why Perl will never die - it will simply evolve as the needs of programmers change. Hey, Smalltalk
Roles are a nice idea ... ok we'll add those (Moose::Role). Hmmm, lets allow method signatures to declare types for their params ... sure no problem (MooseX::Method::Signatures). Wouldn't it be cool if we could treat arrays as objects and invoke methods on them? Sure, here you go (autobox::Core).
- e12e 14y agoAs has been alluded to in another comment: Which other languages that compare to perl have you actually looked at? Python has rich meta-programming. Ruby has (almost) single-handedly super-hyped and re-invented the idea of domain specific languages (DSLs). Lisp is of course all about this (as is Forth). Javascript builds on the ideas from Smalltalk and (especially) Self to allow you to crazy stuff with how objects work... Java can't do much of this, but the JVM has been bent in surprising ways by efforts like Clojure and Scala... While it is great that you know and like perl -- That particular point in the post (and this comment) seems rather poorly researched. I'm very much on the burnt-by-crazy-old-nasty-perl-legacy-crap side of the fence -- but I can't deny that I see some of the reasons why people would like to use perl -- it's just not for me. The statement "Perl evolves in a ... manner that makes the language always fresh" makes me want to hide under the bed -- if I have to deal with someone else's code in production ;-) Still -- it's a bit strange to see the claim that perl is somehow much more flexible than other comparable languages.
- ionforce 14y agoSo, you acknowledge that your experience with Perl is outdated, yet you're sticking to your guns.
- e12e 14y agoThe particular claim was that Perl programmers extend the core language via Perl's ability to do meta-programming and that Perl is more flexible than other (comparable) languages. Further clarification with regards to DSLs show that the poster meant that Perl has been more flexible for quite some time (before Ruby hit in the western world) -- ie: from the time that I did look at Perl rather seriously. At that time there were already quite a lot of movement within eg: python with improvements being made to the language, in the language itself. So, yes, I guess I'm sticking to my guns.
- e12e 14y agoAnd, incidentally, I was wrong: http://news.ycombinator.com/item?id=4463536 http://news.ycombinator.com/item?id=4463536
- ironcamel 14y ago"As has been alluded to in another comment: Which other languages that compare to perl have you actually looked at?" I am very familiar with all of the languages that you mention. They are all great languages in their own right. My comment however was about Perl's ability to easily evolve the core language via contributions from its community, as opposed to other languages that require a lenghty process performed by the core maintainers of the language. This allows Perl to evolve at a much faster pace than other languages. A lot of your points do not seem relevant in that context. "Python has rich meta-programming." Who cares? So do most modern languages. "Ruby has (almost) single-handedly super-hyped and re-invented the idea of domain specific languages (DSLs)." The Perl community has been writing DSL's since before most people had heard of Ruby. Real DSL's. Not just invoking functions without parens and labeling it a DSL, as is often done in the Ruby community. Ruby in no way invented or re-invented anything having to do with DSL's. "Lisp is of course all about this (as is Forth)." Agreed. Lisp macros are very powerful. Lisp is a great example of a language that can do this. "I'm very much on the burnt-by-crazy-old-nasty-perl-legacy-crap side of the fence -- but I can't deny that I see some of the reasons why people would like to use perl -- it's just not for me." This is a common complaint. People have had to deal with Perl code that they do not understand. It may have been poorly written, or it may have been perfectly written Perl code. If you do not take the time to learn Perl, you would not know the difference. The most common reaction is to blame the language. "Still -- it's a bit strange to see the claim that perl is somehow much more flexible than other comparable languages." It may be strange to you because you are not very familiar with Perl.
- sciurus 14y ago"People have had to deal with Perl code that they do not understand. It may have been poorly written, or it may have been perfectly written Perl code. If you do not take the time to learn Perl, you would not know the difference." The problem is that Perl's TIMTOWDI culture and the inconsistent evolution of the core language make learning "enough" Perl harder than learning e.g. "enough" Python.
- chromatic 14y agoPython's "one obvious way" to do things changes over time too!