>>>>> "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes:

  ML> On Friday, February 7, 2003, at 03:38  PM, Uri Guttman wrote:
  >> but you can't derive the rules about allowing push/pop/splice/slice
  >> from
  >> that pair of defintions.

  ML> Is there any syntactic reason why both of the following cannot be
  ML> allowed?

  ML>      (1,2,3).pop

that is no different than saying (3). as the list can't be modified nor
a ref taken, the pop is illegal.

  ML>      [1,2,3].pop

  ML> I don't know that one is any more/less useful than the other, and it
  ML> would seem a list could be silently promoted to an array where it is
  ML> used as an array.  For example,

  ML>      \(1,2,3)

  ML> returns an array reference...

in perl5 it returns a list of refs ( \1, \2, \3 ). i dunno the perl6
semantics. it could be the same as [ 1, 2, 3 ] which means it is not a
list but sugar for a new anon array and more like:

         do{ \my @foo = ( 1, 2, 3 ) }

but we only need [] for all that.

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org
Damian Conway Perl Classes - January 2003 -- http://www.stemsystems.com/class

Reply via email to