4 ms·
It's a little sad watching people who live in the Perl echo chamber convince themselves that Perl use hasn't declined in the last years.
by jbellis 16y ago
It's a little sad watching people who live in the Perl echo chamber convince themselves that Perl use hasn't declined in the last years.
- berntb 16y agoI found out something that makes life on HN better. To avoid the [language war] trolls in stories about Perl, I mention Moose. Since it is a better OO system than anything in the competition, they generally go away... :-) Edit: I really wish Lisp was the competition today, I always loved it. :-( I've never used CLOS, but afaik Moose is directly inspired by it (MOP, right?).
- sreque 16y agoI'll trollishly bite. I just read http://search.cpan.org/~flora/Moose-1.05/lib/Moose/Manual/Concepts.pod http://search.cpan.org/~flora/Moose-1.05/lib/Moose/Manual/Co.... While it does look like a good library that I'd be interested in learning if I'm ever forced to code Perl for monies again, I don't see anything special in it that isn't in other languages or couldn't be implemented in them as a library.
- berntb 16y agoPlease see draegtun's references, re MOP. (You don't like mixins in Role form? Ah, never mind -- I have real work to do.)
- sreque 16y agoWhat does Moose's mixins in role form give you over Ruby's mixins, or Scala's mixins, or PLT-Scheme's mixins, or just simulating mixins via a multiple-inheritance hierarchy ala Python or C++? I'm not going to spend a ton of time researching, but from what I see at links like http://search.cpan.org/~flora/Moose-1.05/lib/Moose/Manual/Roles.podm http://search.cpan.org/~flora/Moose-1.05/lib/Moose/Manual/Ro..., it seems like a nice idea but it's certainly been done before and since in other languages. A lot of the features like method exclusion and aliasing or required host methods could easily be implemented in a library on top of your favorite dynamic language as well if they don't include them natively. The MOP looks like a necessary tool for Perl's horribly designed OO that wouldn't be necessary for most other languages or could just as easily be implemented as a library. Python and Ruby both have what seems to be the equivalent of metaclasses. Most OO languages have some idea of what an attribute is. And so on. Once again, MOP looks neat, but it's certainly not unique to Moose. edit: reading the MOP link more carefully, the idea of a class builder builder is more sophisticated than I originally thought MOP was, but as the link says, you're heading into esoteric territory at that point.
- chromatic 16y agoWhat does Moose's mixins in role form give you over Ruby's mixins, or Scala's mixins, or PLT-Scheme's mixins, or just simulating mixins via a multiple-inheritance hierarchy ala Python or C++? Safety and correctness.
- sreque 16y agoNot sure what you mean. In Ruby, for instance, whenever a module is mixed in a hook method on the module is called. You can enforce any safety or correctness constraints on the parent class that you want at that point. You can easily imagine writing a library in ruby that lets you do the same things as in Moose in terms of correctness and safety. Similarly, you could write your own 'include' method that took extra parameters and performed the same mixin magic Moose is doing like excluding or aliasing methods, performing special handling of conflicting methods, etc. My main point in all this is that, from my perspective, Moose may have a few bells and whistles beyond the base OO features of other dynamic languages, but these features are more 'nice to haves' than 'essentials. More importantly, these features could also be trivially added in other languages as libraries. Most importantly of all, none of these features is as important as starting out with a clean, well-designed language in the first place, and Perl is anything but clean or well-designed.
- chromatic 16y agoNot sure what you mean. Duck typing suffers from the false cognate problem, and mixins suffer from false cognates and potential collisions. They also do nothing to ensure type safety or optional type-based compile-time optimizations. More importantly, these features could also be trivially added in other languages as libraries. Non-Moose Perl 5, Tcl, Lisp-pre-CLOS, Lua, and JavaScript to some extent demonstrate the "you can roll your own object system trivially!" fallacy, especially when you want to use libraries written by other people. Likewise, I'm not aware of anyone who's used roles in a serious project who wants to go back to object systems without them.
- berntb 16y agoSorry for being irritated in the other comment, you obviously asked serious questions out of interest. I'll try to not let the trolling whenever Perl is mentioned to get under my skin in the future. (On the other hand, you got a better answer than from me when Chromatic answered. :-) )
- loewenskind 16y agoAnything in the competition, like say, CLOS? But I'll grant you that Moose is better than what a lot of other languages offer.
- draegtun 16y agoMoose is heavily inspired by CLOS and its borrowed features from it including having it built on top of a meta-circular MOP: http://search.cpan.org/dist/Class-MOP/ http://search.cpan.org/dist/Class-MOP/ You may find this Perlmonks discussion interesting, especially "stvn" comments: http://www.perlmonks.org/?node_id=655788 http://www.perlmonks.org/?node_id=655788
- acg 16y agoDecline is different from dead. The language is not dead, less people might use it. You cannot judge the popularity of a language just from, say, the position of a web programmer. Computing is so diverse now, perl will always have an active community (it seems to me) as it is very good for certain types of problems. Funnily enough, those are the problems that is was originally designed for: not CGI. Perl is a great tool, in the tradition of the Unix command line. It is a testament to its success that is not considered to be a more powerful awk.
- bmj 16y agoPerl is a great tool, in the tradition of the Unix command line. Indeed. Most of my day job programming is in C#, and I don't suspect that my employer would ever want a major product release written in Perl, but we have plenty of internal tools that are written in Perl, and new ones are always being created.
- sigzero 16y agoI belong to a fairly large development shop. There is a lot of Perl development, a little Python and no Ruby. That probably doesn't snapshot the industry but the talks around the watering hole are usually Perl or Python related.
- draegtun 16y agoThere is nothing sad about Damian Conway. I highly recommend you catch one of his many presentations and most likely you will come away feeling intensely thought provoked and definitely not "sad" :)
- klein_waffle 16y agoI have seen Damian's amazing presentations and I still feel sad for what's happened to Perl since he became a strong influence. I believe he is the one who has most encouraged the tendencies which led to the Perl 6 debacle. His strong charisma has made it acceptable to have the following attitudes in the Perl 6 effort: - Actual use by mortal programmers is boring; satisfying your desire to be brilliant and clever is what matters - Complexity and obscurity are fun. Perl is good or popular because the language is complex, therefore the next version of Perl should be even more complex. Perl 6 really has nothing to do with Perl 5. It's more like those movies that say "a movie by the producers of $THING_THAT_WAS_AWESOME" which neglect to mention the script and the director are different.
- chromatic 16y agoNone of those attitudes drive the design of Perl 6. Why do you believe they do?
- sigzero 16y agoI have thought and continue to think that Perl6 is running the VB.NET route. VB.NET had a cursory relationship to VB but they really are two different languages.
- berntb 16y agoI had decided to not comment any more in this thread because the language trolls got started, but... This is what Conway is claimed to be influencing: >>- Actual use by mortal programmers is boring; satisfying your desire to be brilliant and clever is what matters [etc] Go check who wrote "Perl Best Practices". Better yet, read the book. (And please don't try arguing "REAL influence", or something...)
- mst 16y agoThere are more CPAN authors than ever before. There are more CPAN uploads than ever before. I used to give out a couple commit bits a week to projects I'm involved in; now we've got half a dozen people with access to do that giving out at least one a week (and this in spite of the fact that we're getting at least that many new contributors through github as well). Overall Perl use may have declined, but good, effective, maintainable Perl use by people who're involved in the community is on the rise - and that's the group that I'm a part of, the people who write Perl as a robust, team-oriented, scalable production language rather than the PERL scripters of old (and my thoughts go out to the PHP and ruby communities who seem to have acquired a similar breed of idiot this time round the hype mill).
- whopa 16y agoThere's a lot of CPAN activity, but my impression is that a lot of it seems confined to only a handful of problem domains. There's tons of choice with date libraries, or OO frameworks, or unit test frameworks, but other languages have solutions for that too. For all the talk of CPAN being so killer, there actually isn't much there that other languages don't also have. There may be more choice in implementation of a fairly common concept, but that's the Perl way. The "aha, I'll use Perl because this CPAN module implements exactly what I want, and nobody else does" moment rarely happens.
- expeditious 16y ago> There's a lot of CPAN activity, but my impression is that a lot of it seems confined to only a handful of problem domains. You can see a list of recent uploads here: http://www.cpan.org/RECENT.html http://www.cpan.org/RECENT.html > There's tons of choice with date libraries, Most everyone uses DateTime. > or OO frameworks, Nowadays choosing this one is simple: Moose > or unit test frameworks Test::More is pretty standard. > For all the talk of CPAN being so killer, there actually isn't much there that other languages don't also have. That is approximately the opposite of my experiences with the CPAN.
- prog 16y agoWhile I would choose Python (or Ruby) over Perl 5, I think Perl 6 has a lot to offer a programmer. I am just waiting for a stable release. Even if Perl 5 may have declined (can't say for sure), I think Perl 6 may change that.