http://qs321.pair.com?node_id=872157


in reply to Re^2: Does perl6 have a native linked-list data type?
in thread Does perl6 have a native linked-list data type?

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.