6 ms·
Perl6 is really a strict supserset of Perl5 in this way. Perl6 is at least as good as Perl5 for everything Perl5 is good at. But Perl6 is way, way more than t
by Diederich 11y ago
Perl6 is really a strict supserset of Perl5 in this way.
Perl6 is at least as good as Perl5 for everything Perl5 is good at.
But Perl6 is way, way more than that.
- debacle 11y agoI'll probably be trouted by a Perl monk for saying it, but sometimes less is more.
- Diederich 11y agoHa, what happens when one is 'trouted'?? It's been a number of years, and I can't check right now, but I believe that the amount of code in Perl6 is actually less than in Perl5. The amazing power that is Perl6 naturally falls out of a whole lot of experience and fantastic design decisions. Not to mention several great implementations. I'm a big fan of 'less is more' as well. In this case, you're literally correct: Perl6 delivers a LOT MORE than Perl5 even though there's 'less to it'!
- gknoy 11y agoI expect it's based on the /slap emote in IRC. Wikipedia [0] has a page on it, from which I swipe the follwing: `When someone does something inadvisable that they had the experience and intelligence to avoid, you may likely see the suggestion that they be "trouted"` Trout slapping originated in 1995 with internet relay chat (IRC). While in an IRC chat room, the IRC client mIRC would allow users to enter the command: /slap Sam - Steve slaps Sam around a bit with a large trout 0: https://en.wikipedia.org/wiki/Wikipedia:Whacking_with_a_wet_trout https://en.wikipedia.org/wiki/Wikipedia:Whacking_with_a_wet_...
- dasil003 11y agoWow, that's a blast from the past. Did it really originate in mIRC? Somehow I feel like it predated that, but maybe just because I didn't run Windows.
- kbenson 11y agoIt sounded Monty Python-ish to me, and it looks plausible[1]. 1: https://www.youtube.com/watch?v=WsfiD78Cy0s https://www.youtube.com/watch?v=WsfiD78Cy0s
- amyjess 11y agoI first encountered it in the mid-to-late '90s, and it was definitely considered an IRCism back then (in that IRC was the only place you saw trouting), but I had no idea it originated as an mIRC builtin.
- kamaal 11y agoDepends on the problem on hand. You can't really replace lifts with thousands of ladders, when you are building a sky scraper.
- acqq 11y ago> Perl6 is really a strict supserset of Perl5 in this way. How? And can you cite any sources that I can read? Thanks.
- Diederich 11y agoWell, I made a pretty grand statement there, which means it will be demonstrably wrong in at least some cases. I don't have time to find supporting sources right now, but I'll just say a couple of things, regarding Perl6 and string manipulation. Less concretely, Perl6 is still Perl. What does 'Perl' mean? "manipulexity and whipuptitude" :) To me, those things are about being highly pragmatic in as many real-life situations as possible. More concretely, even though Perl6 has an amazing type system, it's almost all optional. Use it incrementally, as it becomes more useful. Also, the tight and powerful integration between language and regex still exists. So, again, regarding string processing, these elements, to me, show that Perl6 is a 'strict supserset' of Perl5. And, without any citations, I feel like that 'strict superset' is mostly true for things other than string processing!
- btilly 11y agoPerl6 is at least as good as Perl5 for everything Perl5 is good at. No. It is not. Don't believe me? Here is a short list of classic selling points for Perl 5 that Perl 6 clearly loses on. 1. Performance. Back in the 1990s, Perl hit a sweet spot of being quick for development while still being fast enough for a wide variety of tasks. It still performs reasonably well versus other scripting language. Every time I looked at Perl 6 it failed to be fast enough for anything interesting to me. 2. Library support. Any argument for Perl quickly lists CPAN. It is a large part of why people adopted it in the first place. Perl 6 loses to every major language, including Perl 5, on this. If you need to do anything from connect to a database to sending email, Perl 6 loses. 3. Backwards compatibility. Perl has a history of being careful with backwards compatibility, starting with Perl 1's unit test suite back in the mid-80s. (It would be decades until other language communities caught up.) Most organizations currently using Perl 5 use it because they already have existing code in Perl 5. Their primary motivation for staying on Perl is that they don't want to rewrite their code. Perl 6 requires a rewrite of their code.
- kbenson 11y ago1. Can't argue with this. 2. With Inline::Perl5[1] this should be a non-issue. The short code snippet in the README at the github repo referenced should give you the idea. 3. Having not been released yet, Perl 6 has zero history on backwards compatibility, so there's no way to assess whether it's relatively better or worse than Perl 5. That said, I don't necessarily support the original statement that Perl 6 is a superset and at least as good as Perl 5 at everything. I just wanted to address your specific statement regarding library support. 1: https://github.com/niner/Inline-Perl5 https://github.com/niner/Inline-Perl5
- cwyers 11y ago> Having not been released yet, Perl 6 has zero history on backwards compatibility, so there's no way to assess whether it's relatively better or worse than Perl 5. Well, uh, it's not backwards-compatible with Perl 5. Yes, yes, I know, "It's a different language." So why is it called "Perl 6?" The name is very much designed to tell us "this is the one after Perl 5." Insisting that everyone evaluate it as a greenfield language is an incredible insistence upon cognitive dissonance.