Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
And since Perl6 i supposed to have a very flexible syntax, it shouldn't be too difficult to adapt map, grep and other similar functions in an efficient way without hardcoding linked lists in C.

That's correct, but I honestly don't understand the point. If you want lists, you just use the built-in lists. In Perl you'd use CONS/Pair only to build more complex data structures, like trees. And if you use that kind of flexibility, a generally overloaded map or grep isn't of much use anymore.

I've heard there are applications where you need to often insert or remove items from the middle of a list, but somehow I've never needed it in my own code. If I did, the proper perlish way would be o provide an alternative to the Array type, which also implements the Positional role. It would be usable just like an Array, except with different performance charateristics.

In reply to Re^3: Does perl6 have a native linked-list data type? by moritz
in thread Does perl6 have a native linked-list data type? by perl5ever

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2022-05-19 02:59 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (71 votes). Check out past polls.