Re: Quick question: (...) vs [...]

2008-08-09 Thread Patrick R. Michaud
On Fri, Aug 08, 2008 at 11:08:51PM -0400, Brandon S. Allbery KF8NH wrote: > > On 2008 Aug 8, at 22:53, John M. Dlugosz wrote: > >> What is the difference between (1,2,3) and [1,2,3] ? > > IIRC one is a list, the other a reference to a list --- which in perl6 > will be hidden for the most part. so

Re: Quick question: (...) vs [...]

2008-08-09 Thread Mark J. Reed
On Sat, Aug 9, 2008 at 7:01 AM, Audrey Tang <[EMAIL PROTECTED]> wrote: > One is a List and one is an Array; you cannot push into a list, but you can > into an array. > > my @a := (1,2,3); > my @b := [1,2,3]; > > @a.push(4); # fails > @b.push(4); # works But note that the first push fails because

Re: Quick question: (...) vs [...]

2008-08-09 Thread Audrey Tang
John M. Dlugosz 提到: What is the difference between (1,2,3) and [1,2,3] ? One is a List and one is an Array; you cannot push into a list, but you can into an array. my @a := (1,2,3); my @b := [1,2,3]; @a.push(4); # fails @b.push(4); # works Cheers, Audrey

Re: Quick question: (...) vs [...]

2008-08-08 Thread Brandon S. Allbery KF8NH
On 2008 Aug 8, at 22:53, John M. Dlugosz wrote: What is the difference between (1,2,3) and [1,2,3] ? IIRC one is a list, the other a reference to a list --- which in perl6 will be hidden for the most part. so practically speaking the difference is minimal. -- brandon s. allbery [solari

Quick question: (...) vs [...]

2008-08-08 Thread John M. Dlugosz
What is the difference between (1,2,3) and [1,2,3] ? --John