Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "AT" == Adam Turoff <[EMAIL PROTECTED]> writes: AT> On Fri, Feb 07, 2003 at 06:38:36PM -0500, Uri Guttman wrote: >> > "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: ML> Along those lines, the closest I've been able to come so far to a ML> usable two-sentence definition is:

Re: Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
On Friday, February 7, 2003, at 04:24 PM, Uri Guttman wrote: 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 Sorry, I was misremembering a threa

Re: Arrays vs. Lists

2003-02-07 Thread Luke Palmer
> Date: Fri, 7 Feb 2003 14:46:37 -0800 > From: Michael Lazzaro <[EMAIL PROTECTED]> > > > On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: > > the whole notion is that lists are always temporary and arrays can be > > as > > permanent as you want (an array ref going quickly out of sco

Re: Arrays vs. Lists

2003-02-07 Thread Adam Turoff
On Fri, Feb 07, 2003 at 06:38:36PM -0500, Uri Guttman wrote: > > "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: > ML> Along those lines, the closest I've been able to come so far to a > ML> usable two-sentence definition is: > > ML> -- A list is an ordered set of scalar values. >

Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "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 follow

Re: Arrays vs. Lists

2003-02-07 Thread Stéphane Payrard
On Fri, Feb 07, 2003 at 02:30:47PM -0500, Mark J. Reed wrote: > On 2003-02-07 at 14:26:42, Mark J. Reed wrote: > > Not really, though. A list can be an lvalue, provided it is a list > > of lvalues: Note that to avoid the burden of writing an explicit slice, 'undef' is considered as a lvalue in su

Re: Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
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. Is there any syntactic reason why both of the following cannot be allowed? (1,2,3).pop [1,2,3].pop I don't know that one is

Re: Arrays vs. Lists

2003-02-07 Thread Dave Whipp
"Michael Lazzaro" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Along those lines, the closest I've been able to come so far to a > usable two-sentence definition is: > > -- A list is an ordered set of scalar values. quibble: that's an "ordered bag", isn't it?

Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "ML" == Michael Lazzaro <[EMAIL PROTECTED]> writes: ML> On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: >> the whole notion is that lists are always temporary and arrays can >> be as >> permanent as you want (an array ref going quickly out of scope is very >> temporar

Re: Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
On Friday, February 7, 2003, at 02:07 PM, Uri Guttman wrote: the whole notion is that lists are always temporary and arrays can be as permanent as you want (an array ref going quickly out of scope is very temporary). lists can't live beyond the current expression but arrays can. Along those l

Re: Arrays vs. Lists

2003-02-07 Thread Uri Guttman
> "MJR" == Mark J Reed <[EMAIL PROTECTED]> writes: MJR> A reference is fundamentally a pointer, but that doesn't help. My point MJR> was that if you're talking about lists vs. arrays, you have at least MJR> three different syntaxes to distinguish: MJR> (1,2,3) MJR>

Re: Arrays vs. Lists

2003-02-07 Thread Mark J. Reed
On 2003-02-07 at 12:18:21, Austin Hastings wrote: > > Although this may reasonably be regarded as a special case; you > > certainly can't pop a list: > > > > (1,2,3).pop => error > > But could you do it the other way (function instead of method)? > pop (1,2,3) => ? Nope. At least, n

Re: Arrays vs. Lists

2003-02-07 Thread Austin Hastings
--- "Mark J. Reed" <[EMAIL PROTECTED]> wrote: > On 2003-02-07 at 11:13:07, Austin Hastings wrote: > > --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > > I'm trying, and failing, to accurately and definitively answer > the > > > question "what's the difference between an array and a list in > >

Re: Arrays vs. Lists

2003-02-07 Thread Mark J. Reed
On 2003-02-07 at 14:26:42, Mark J. Reed wrote: > Not really, though. A list can be an lvalue, provided it is a list > of lvalues: > > ($a, $b, $c) = 1,2,3; Forgot the parens on the right side, there: ($a, $b, $c) = (1,2,3); > But they certainly aren't lvalues: > > [$a,$

Re: Arrays vs. Lists

2003-02-07 Thread Mark J. Reed
On 2003-02-07 at 11:13:07, Austin Hastings wrote: > --- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > I'm trying, and failing, to accurately and definitively answer the > > question "what's the difference between an array and a list in > > Perl6?" > > How's this? > > > A list is a

Re: Arrays vs. Lists

2003-02-07 Thread Austin Hastings
--- Michael Lazzaro <[EMAIL PROTECTED]> wrote: > > I'm trying, and failing, to accurately and definitively answer the > question "what's the difference between an array and a list in > Perl6?" > > If someone can come up with a simple but accurate definition, it > would be helpful. How's this? =

Arrays vs. Lists

2003-02-07 Thread Michael Lazzaro
I'm trying, and failing, to accurately and definitively answer the question "what's the difference between an array and a list in Perl6?" If someone can come up with a simple but accurate definition, it would be helpful. MikeL