Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Looking at the history of Perl 5, it is very unlikely that a perl compiled with default settings will break old code. One of the top priorities of Perl 5 is backwards compatibility at (nearly) all costs. This is easily to see with strict and warnings, both are off by default simply because they could break old, dirty scripts. say, given-when, need to be enabled explicitly, because old scripts may have used those words as function names and would break otherwise. Smart match and defined-or are disabled by default, Perl 5 still accepts Perl 4 function calls with a & in front of the function name, and so on.

Another problem with a parallelizing grep is that it will likely need threads. Threads are still optional in Perl 5, many modules are still not thread-safe, and the perl interpreter would have to add a lot of behind-the-scenes tricks to make sure a parallelizing grep build-in behaves exactly identically to a non-parallelizing grep under all circumstances (including abuse as map or for), except for the better performance. I doubt that all that extra code required would make grep significantly faster.

So, I think it is very unlikely that we will see a parallelizing grep in Perl 5, and it is even more unlikely that any improved grep, parallelized or not, will - by default - behave differently than grep in Perl 5.0.0, except for the performance or memory usage. For a dramatically improved, but incompatible grep, we can expect to see some pragma enabling it, perhaps use feature qw(parallelgrep); or use parallelgrep;.

abufct, if you want to be really paranoid about grep and map behaviour, add a test for the expected behaviour to your installer. Something like this:

#!/usr/bin/perl use strict; use warnings; use Test::More tests=>2; is(join(":",grep { $_%2==0 } 1..6),"2:4:6","grep keeps order"); is(join(":",map { 1+$_ } 1..6),"2:3:4:5:6:7","map keeps order");


Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

In reply to Re^4: Order in which grep/map receive elements by afoken
in thread Order in which grep/map receive elements by abufct

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [choroba]: Also, try asking at IRC
    [usemodperl]: corion baby you have done nothing of the sort
    [usemodperl]: asking how to download from cpan with core perl via http is unreasonable???
    [Corion]: usemodperl: No, asking is not unreasonable. Insisting that it must always keep working for you is unreasonable.
    [Corion]: But again, you haven't explained why your users need to download, or why they need to download via http, or why you can't host the SSL-stripper yourself.
    [choroba]: Wait a second. Does shutting down mean the cpan clients can no longer use their urllist?
    [usemodperl]: i'm under no obligation to explain myself mommy, and i'm not insisting, just asking a simple question
    [Veltro]: So, I'm confused on the matter actually. There are locked-down computers, but they need updates. How does that work? Isn't that contradictary?
    [usemodperl]: EXACTLY
    [usemodperl]: and the https only situation makes it even worse

    How do I use this? | Other CB clients
    Other Users?
    Others pondering the Monastery: (8)
    As of 2018-06-24 16:38 GMT
    Find Nodes?
      Voting Booth?
      Should cpanminus be part of the standard Perl release?

      Results (126 votes). Check out past polls.