Some random musings, for what they're worth...

1) The fact that we've had this long thread about arrays and shows
   that they are confusing.  How could we change the
   functionality/eliminate the differences so as to simplify things? 

2) It seems that the functionality of lists is a proper subset of the
   functionality of arrays.  If this is the case and I'm not just
   missing something, we might want to at least consider some way to
   eliminate lists as a separate data type.

2a) What would be the costs (performance and otherwise) of eliminating
    lists and just having people use anonymous array composers where
    they would normally use a list?  How much more expensive is it to
    allocate an array on the heap than an equivalent list on the
    stack? 

3) More interesting than eliminating lists would be to distinguish
   them...to give them a "special power" of their own.  My suggestion
   would be to make lists behave as a shortcut for mapping over their
   elements.  Therefore:

        (@a, @b, @c).pop();  
        # same as @{[@a, @b, @c]}.map({pop})

        %z = (@a, @b, @c).{$_[0] => $_}; 
        # same as @z = @{[@a, @b, @c]}.map({$_[0] => $_});

4) Also spiffy would be if we could make lists auto-hyper their
   elements:

        @a = (1, 2, 3) + 7;
        # same as @a = (1, 2, 3) >>+<< 7;
        # might need to be @a = (1, 2, 3).+ 7;



Ok, I will now sit back and listen to reasons why this is a bad
idea. :>


--Dks

Reply via email to