Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^14: Order in which grep/map receive elements

by abufct (Initiate)
on Oct 09, 2012 at 06:51 UTC ( [id://997936]=note: print w/replies, xml ) Need Help??


in reply to Re^13: Order in which grep/map receive elements
in thread Order in which grep/map receive elements

As I pointed out back up here -- the docs give a statement of the current reality; not a guarantee!
Wow, I didn't get your point then.
I am sorry, is that _your_ opinion, or well known fact (like the one that grep processes elements consequently)?
When I read std::vector docs (C++) and it says that "vector containers have their elements stored in contiguous storage locations", or that accessing elements takes constant time, then I know that this is a guarantee. And it's not just implementation or "current reality".
  • Comment on Re^14: Order in which grep/map receive elements

Replies are listed 'Best First'.
Re^15: Order in which grep/map receive elements
by BrowserUk (Patriarch) on Oct 09, 2012 at 08:03 UTC
    When I read std::vector docs (C++) ...

    Even with the docs for a commitee designed, standards backed library like the STL, shit happens. And when it does -- eg. an STL library bug I encountered on the 8th September this year -- we users have to track the bug down in order to report it, and (with luck) in the fullness of time, it might get fixed. But in the interim, we users have to code our way around those bugs until the next release comes available.

    Just do a search:std::vector confirmed bug to see how prevalent these are. If your users/customers are going to be happy with -- sorry, can't fix it until the next release (or the one after) of the STL -- then by all means, treat the STL as a black box. If you are prepared to shell out for a priority maintenance contract with your compiler/STL supplier, maybe you can get more prompt action, but at a considerable price.

    But with CPAN libraries -- and even Perl itself -- you are talking volunteers, mostly hobbyists holding down day jobs, and best-efforts. They'll get to it when they get to it; but only once you have provided a very clear demonstration of the bug -- and preferably a patch. And that means getting your hands dirty and pitching in. And that means every library, and all its dependencies become a part of your code-base for teh purposes of bug discovery and fixing.

    Many of the CPAN authors are highly skilled guys who take great pride in their hobby and maintain their modules as if they were their own homes -- sometimes better :).

    But there are also many less well written and maintained packages, where the original authors have long since moved on to other projects, languages and work roles. Some of them are dead. Sometimes -- with the more well used, better designed modules, another volunteer will step into the breach and will -- whether through choice or necessity -- pick up the maintenance role.

    But inferring these documents -- and their statements of current reality, or even intent -- to give "guarantees" is to guarantee only disappointment and worse.

    Given the current author/maintainer of List::MoreUtils, I have little doubt that any bug that arose would be corrected ASAP. But the same is true of Perl itself. And any change in the output ordering of grep would absolutely be classed as a bug; regardless of whether anyone has thought to state the reality of that ordering in the docs or not.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://997936]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-04-19 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found