> From: "Ph. Marek" <[EMAIL PROTECTED]>
> Date: Wed, 12 Feb 2003 08:42:57 +0100
>
> --Boundary-00=_BsfS+fOE40iabfr
> Content-Type: text/plain;
> charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> Hello everybody,
>
> I've sometimes the task to analyse a stri
Hello everybody,
I've sometimes the task to analyse a string
starting from a given position, where this position
changes after each iteration. (like index() does)
As this is perl there are MTOWTDIIP but I'd like
to know the fastest.
So I used Benchmark.pm to find that out. (script attached)
> But is it OK for a list to be silently promoted to an array when used
> as an array? So that all of the following would work, and not just 50%
> of them?
> (1..10).map {...}
> [1..10].map {...}
And somehow related to all this . . .
Let's assume for the moment that there's still a fun
Dave Whipp:
# > Minor correction: we don't know how many elements are left in the
# > array - it depends on how many elements were in @a, @b, and @c to
# > start with. One less than that. :)
#
# These days you need the splat operator to flatten lists: so
My understanding was that arrays would
"Michael Lazzaro" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> What is the utility of the perl5 behavior:
>
> \($a,$b,$c)
>
> meaning
>
> (\$a, \$b, \$c)
>
> Do people really do that? I must say, given that it looks *so
> obviously* like it instead
"Mark J. Reed" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On 2003-02-11 at 17:44:08, Mark J. Reed wrote:
> > pop @{[@a,@b,@c]}
> >
> > It creates an anonymous array, then removes the last element, leaving
two
> > elements in the array - which is i
> "JFR" == Joseph F Ryan <[EMAIL PROTECTED]> writes:
>> (@a,@b,@c).pop
JFR> This doesn't make any sense, since pop modifies the pop-ee.
JFR> What do you expect should happen here?
>> [@a,@b,@c].pop
JFR> Same as above.
there is a subtle distinction in those two. the first should b
On 2003-02-11 at 17:44:08, Mark J. Reed wrote:
> pop @{[@a,@b,@c]}
>
> It creates an anonymous array, then removes the last element, leaving two
> elements in the array - which is irrelevant since the array is
> then discarded completely.
Minor correction: we don't know how many element
On 2003-02-11 at 17:12:52, Joseph F. Ryan wrote:
> > (@a,@b,@c).pop
>
> This doesn't make any sense, since pop modifies the pop-ee.
> What do you expect should happen here?
>
>
> >
> > [@a,@b,@c].pop
>
>
> Same as above.
Except that the Perl5 equivalent, ugly as the syntax may be, works
Michael Lazzaro wrote:
On Monday, February 10, 2003, at 05:56 PM, Luke Palmer wrote:
Indeed, this supports the distinction, which I will reiterate:
- Arrays are variables.
- Lists are values.
My hesitation about the 'arrays are variables' part is that Damian
corrected me on a simi
> "Michael" == Michael Lazzaro <[EMAIL PROTECTED]> writes:
Michael> Do people really do that? I must say, given that it looks *so
Michael> obviously* like it instead means [$a,$b,$c], I wonder if attempting to
Michael> take a reference to a list should be a compile-time error.
Michael> Note
On Tuesday, February 11, 2003, at 10:56 AM, Garrett Goebel wrote:
What about this?
\@array
hmm. As perl Apoc2, Lists, RFC 175... arrays and hashes return a
reference
to themselves in scalar context... I'm not sure what context '\' puts
them
in.
I'd guess \@array is a reference to an
> Date: Tue, 11 Feb 2003 10:34:57 -0800
> From: Michael Lazzaro <[EMAIL PROTECTED]>
>
> On Monday, February 10, 2003, at 05:56 PM, Luke Palmer wrote:
> > Indeed, this supports the distinction, which I will reiterate:
> >
> > - Arrays are variables.
> > - Lists are values.
>
> My hesitati
[Recipients trimmed back to just p6-language; the Cc: list was getting
a bit large.]
On 2003-02-11 at 12:56:45, Garrett Goebel wrote:
> I'd just stick with Uri's explanation. Arrays are allocated. Lists are
> on the stack...
Nuh-uh. Those are implementation details, not part of the language
defin
From: Michael Lazzaro [mailto:[EMAIL PROTECTED]]
>
> Just to clarify... in P6, is this an array reference, or a list
> reference?
>
> [1,2,3]
Exactly. It's still up in the air...
Apoc 2, RFC 175:
> So it works out that the explicit list composer:
>
>[1,2,3]
>
> is syntactic sugar f
On Monday, February 10, 2003, at 06:26 PM, Joseph F. Ryan wrote:
Deborah Ariel Pickett wrote:
(Just going off on a tangent: Is it true that an array slice such as
@array[4..8]
is syntactically equivalent to this list
(@array[4], @array[5], @array[6], @array[7], @array[8])
? Are array slices
On Monday, February 10, 2003, at 05:56 PM, Luke Palmer wrote:
Indeed, this supports the distinction, which I will reiterate:
- Arrays are variables.
- Lists are values.
My hesitation about the 'arrays are variables' part is that Damian
corrected me on a similar thing when I was writin
The Perl 6 Summary for the week ending 20030209
Welcome to the latest Perl 6 summary, your handy cut out and keep guide
to the goings on in the crazy world of Perl 6 design and development.
It's been a rather quiet week this week; only 75 messages in
perl6-internals and a mere 57
18 matches
Mail list logo