Alan Burlison <[EMAIL PROTECTED]> writes:
>"Randal L. Schwartz" wrote:
>
>> Graham> sub def { my @a = (9,8,7); return @a; }
>>
>> That's not returning the array. That's returning a copy of the contents
>> of @a in a list context, and the number of elements of @a in a scalar
>> context, using the
Tom Christiansen <[EMAIL PROTECTED]> writes:
> >True, but maybe a lower precedance keword is needed like we did
> >or || and &&. I think someone suggested "then"
>
> > print $string1, $string2, "\n" then return 3 if $cond;
>
> >then again, maybe not.
>
> Why not just piss everybody off?
>
>
At 07:33 PM 8/3/00 +0200, Bart Lateur wrote:
>On 03 Aug 2000 06:39:02 -0700, Randal L. Schwartz wrote:
>
> >>> We have one. It's called "comma in a scalar context". :)
> >
> >Bart> Now do the same with a print command.
> >
> >print("This stuff gets"," printed", "\n"), return 3
> >
On 03 Aug 2000 06:39:02 -0700, Randal L. Schwartz wrote:
>>> We have one. It's called "comma in a scalar context". :)
>
>Bart> Now do the same with a print command.
>
>print("This stuff gets"," printed", "\n"), return 3
> if $some_condition;
Somebody please please tell me why
Tom Christiansen wrote:
> return 3 after print $string1, $string2 if $cond;
It's true, perl can learn from intercal too:
do come from (10)
--
John Porter
At 08:14 AM 8/3/00 -0600, Tom Christiansen wrote:
> >True, but maybe a lower precedance keword is needed like we did
> >or || and &&. I think someone suggested "then"
>
> > print $string1, $string2, "\n" then return 3 if $cond;
>
> >then again, maybe not.
>
>Why not just piss everybody off?
>
>
>True, but maybe a lower precedance keword is needed like we did
>or || and &&. I think someone suggested "then"
> print $string1, $string2, "\n" then return 3 if $cond;
>then again, maybe not.
Why not just piss everybody off?
return 3 after print $string1, $string2 if $cond;
honk love f
On Thu, Aug 03, 2000 at 06:39:02AM -0700, Randal L. Schwartz wrote:
> Nope. Sometimes my brain prefers the EXPR if EXPR form because of
> the much smaller punctuation footprint. Removing the comma
> doesn't seem to serve anything but making Perl less powerful, and
> not confusing Chaim quite as
> "Bart" == Bart Lateur <[EMAIL PROTECTED]> writes:
Bart> On 02 Aug 2000 16:42:35 -0700, Randal L. Schwartz wrote:
Steve> We could add a 'then' keyword.
>>
>> We have one. It's called "comma in a scalar context". :)
Bart> Now do the same with a print command.
print("This stuff get
On 02 Aug 2000 16:42:35 -0700, Randal L. Schwartz wrote:
>Steve> We could add a 'then' keyword.
>
>We have one. It's called "comma in a scalar context". :)
Now do the same with a print command.
Aren't you trying to hard leaning backwards?
--
Bart.
> "Steve" == Steve Fink <[EMAIL PROTECTED]> writes:
Steve> We could add a 'then' keyword.
We have one. It's called "comma in a scalar context". :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Uni
"Randal L. Schwartz" wrote:
>
> > "Martyn" == Martyn Pearce <[EMAIL PROTECTED]> writes:
>
> Martyn> Possibly, although I must ask: since everything is up-for-grabs, I ask
> Martyn> (without implying any feeling one-way-or-tother):
> Martyn> How useful is the , operator in it's C-style statem
On Wed, Aug 02, 2000 at 08:10:01PM +0100, Alan Burlison wrote:
> "Randal L. Schwartz" wrote:
>
> > Graham> sub def { my @a = (9,8,7); return @a; }
> >
> > That's not returning the array. That's returning a copy of the contents
> > of @a in a list context, and the number of elements of @a in a s
"Randal L. Schwartz" wrote:
> Graham> sub def { my @a = (9,8,7); return @a; }
>
> That's not returning the array. That's returning a copy of the contents
> of @a in a list context, and the number of elements of @a in a scalar
> context, using the "@a" operator. You still haven't "returned the
What's wrong with do {}? (Added typing?)
> "RLS" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
RLS> I use it a lot, in places where I want two expressions executed,
RLS> especially as one part of "EXPR while EXPR" or "EXPR if EXPR".
RLS> Yeah, I could use a do-block on either side, but
> "RLS" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
Chaim> Then perhaps, just get rid of the list/array distinction? Make
Chaim> everything an array?
RLS> Because it's useful to have it the way it is.
Please elaborate. I don't quite see why this distinction needs to be made.
APL, Posts
As I said before. Let us get rid of the distinction.
Here is Randal and Graham arguing about a 'fundamental' issue. I don't
think this is fundamental to 'What is Perl'. This is a great question
to stump someone on an interview.
Ignoring this "push a list/comma seperated list context through a
su
> "Graham" == Graham Barr <[EMAIL PROTECTED]> writes:
Graham> There is a difference
Graham> sub abc { return (7,8,9) }
That's returning either a list or a comma operator result, depending
on context.
Graham> sub def { my @a = (9,8,7); return @a; }
That's not returning the array. That's r
On Wed, Aug 02, 2000 at 09:42:09AM -0700, Randal L. Schwartz wrote:
> > "Graham" == Graham Barr <[EMAIL PROTECTED]> writes:
>
> Graham> You say "operator" and you are right. I think the issue is a sub
> Graham> can return either.
>
> Really? How does a sub return "an array"?
There is a dif
> "Graham" == Graham Barr <[EMAIL PROTECTED]> writes:
Graham> You say "operator" and you are right. I think the issue is a sub
Graham> can return either.
Really? How does a sub return "an array"?
(Unless you're about to mutter something about "lvalue subs" :) a sub
can return only an rvalu
On Wed, Aug 02, 2000 at 08:45:05AM -0700, Randal L. Schwartz wrote:
> You need a list vs. array distinction. An operator can't return an
> array. It can only return a list. Unless you're inventing a
> different language. :)
You say "operator" and you are right. I think the issue is a sub
can
> "RLS" == Randal L Schwartz <[EMAIL PROTECTED]> writes:
> "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
Chaim> It's the overloading of the ',' operator.
RLS> Just like the overloading of the @ARRAY_NAME operator or the
RLS> getpwuid() operator. Perhaps you are back to merely com
> "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:
GB> On Tue, Aug 01, 2000 at 07:41:59PM -0700, Randal L. Schwartz wrote:
>>> > "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
>>>
Chaim> It's the overloading of the ',' opera
> "GB" == Graham Barr <[EMAIL PROTECTED]> writes:
GB> On Tue, Aug 01, 2000 at 07:41:59PM -0700, Randal L. Schwartz wrote:
>> > "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
>>
Chaim> It's the overloading of the ',' operator.
>>
>> Just like the overloading of the @ARRAY_NAME oper
> "Martyn" == Martyn Pearce <[EMAIL PROTECTED]> writes:
Martyn> Possibly, although I must ask: since everything is up-for-grabs, I ask
Martyn> (without implying any feeling one-way-or-tother):
Martyn> How useful is the , operator in it's C-style statement separator, as
Martyn> opposed to list
On Tue, Aug 01, 2000 at 07:41:59PM -0700, Randal L. Schwartz wrote:
> > "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
>
> Chaim> It's the overloading of the ',' operator.
>
> Just like the overloading of the @ARRAY_NAME operator or the
> getpwuid() operator. Perhaps you are back to m
Chaim Frenkel <[EMAIL PROTECTED]> writes:
> > "PC" == Piers Cawley <[EMAIL PROTECTED]> writes:
>
> >> How locked in to your brain is this lack of consistency? How un-perlish
> >> would it be to cleanup, crypto-context, or the meaning of a list in
> >> a scalar context, or ...
>
> PC> Don't
Randal L. Schwartz writes:
| > "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
|
| Chaim> It's the overloading of the ',' operator.
|
| Just like the overloading of the @ARRAY_NAME operator or the
| getpwuid() operator. Perhaps you are back to merely complaining about
| all context-s
On Tue, Aug 01, 2000 at 12:27:56PM -0400, Chaim Frenkel wrote:
>
>(Kirrily, this one is for the record.)
>
>I'd also like to add, redo, next, last escaping a subroutine.
Can you please give me more detail on that? An RFC would be ideal :)
K.
--
Kirrily Robert -- <[EMAIL PROTECTED]> -- http://
Thus it was written in the epistle of Matthew Persico,
> Johan Vromans wrote:
> >
> > On Mon, Jul 31, 2000 at 09:50:11PM -0600, Nathan Torkington wrote:
> > > So Larry is doing most of the evaluation for us. He's the one who
> > > gave us the good things in the Perl language we have now. He'll
> "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
Chaim> It's the overloading of the ',' operator.
Just like the overloading of the @ARRAY_NAME operator or the
getpwuid() operator. Perhaps you are back to merely complaining about
all context-sensitive things again. :-)
--
Randal L. S
> "BC" == Brust, Corwin <[EMAIL PROTECTED]> writes:
BC> But is this useful?
BC> sub baz { return ( 'one','two' ) }
BC> my ($foo, $bar) = &baz; # $foo == 'one', $bar == 'two'
Certainly.
I just don't like the fact that the runtime scalar context is having
a compile time semantic effect.
It'
Johan Vromans wrote:
>
> On Mon, Jul 31, 2000 at 09:50:11PM -0600, Nathan Torkington wrote:
> > So Larry is doing most of the evaluation for us. He's the one who
> > gave us the good things in the Perl language we have now. He'll be
> > the one vetoing the ridiculous ideas.
>
> Larry said: "Pe
> "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
> "CF" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
CF> (Kirrily, this one is for the record.)
CF> I'd also like to add, redo, next, last escaping a subroutine.
Chaim> Make that _NOT_ escaping a subroutine.
Chaim> map { ...; last
> "Chaim" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
Chaim> I don't find this meaningful:
Chaim> sub foo() { return (1,7) }
Chaim> $x = &foo();# $x == 7;
I do. It's perfectly consistent.
$x = SUBROUTINE CALL
...
SUBROUTINE CALL = (1,7)
You just factor out the subro
wley
Cc: Ted Ashton; Tom Christiansen; Simon Cozens; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: perl 6 requirements
>>>>> "PC" == Piers Cawley <[EMAIL PROTECTED]> writes:
>> How locked in to your brain is this lack of consistency? How un-perlish
>> woul
> "PC" == Piers Cawley <[EMAIL PROTECTED]> writes:
>> How locked in to your brain is this lack of consistency? How un-perlish
>> would it be to cleanup, crypto-context, or the meaning of a list in
>> a scalar context, or ...
PC> Don't you go touching the meaning of a list in a scalar context
> "CF" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
CF> (Kirrily, this one is for the record.)
CF> I'd also like to add, redo, next, last escaping a subroutine.
Make that _NOT_ escaping a subroutine.
map { ...; last; ...} @foo
should simply terminate the map, not go to the next c
Chaim Frenkel <[EMAIL PROTECTED]> writes:
> > "CF" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
>
> > "TA" == Ted Ashton <[EMAIL PROTECTED]> writes:
> TA> In general, they do what you want, unless you want consistency.
>
> CF> Randal, Tom, et. al.
>
> CF> How locked in to your brain is
Chaim Frenkel <[EMAIL PROTECTED]> writes:
> > "TA" == Ted Ashton <[EMAIL PROTECTED]> writes:
>
> TA> In general, they do what you want, unless you want consistency.
>
> Randal, Tom, et. al.
>
> How locked in to your brain is this lack of consistency? How un-perlish
> would it be to clean
Ted Ashton wrote:
>
> Moving the discussion to perl6-language:
>
> Thus it was written in the epistle of Nathan Wiger,
> > Chaim Frenkel wrote:
> > >
> > > Language
> > > -> Obsolete Features
> > > -> 1. Formats are not commonly used
> > >
> > > I'm sorry where did this come from. I
Tom Christiansen wrote:
> You're probably right, on every single point.
>
> I did the "What is Perl?" thing to focus folks on what this was
> really for, since many seem to be trying to create a new and different
> language now. And you've said all that here just fine.
Thanks :-)
There is ano
>'Scuse me, but I'm a bit puzzled by this whole 'What is Perl' thing. My
>understanding of the rewrite was that it was primarily to provide a
>cleaner implementation than the current 'worn out' one, and to remove
>some of the more egregious features, e.g. the over-reliance on globs in
>some place
'Scuse me, but I'm a bit puzzled by this whole 'What is Perl' thing. My
understanding of the rewrite was that it was primarily to provide a
cleaner implementation than the current 'worn out' one, and to remove
some of the more egregious features, e.g. the over-reliance on globs in
some places, mo
Thank you for your compliments.
> Would you be willing to give us a first shot at what Perl *is* to get the
>discussion going?
Only as slogans; deep analysis will require ascending a nearby summit.
"Perl is a language you already know, but that you just don't
know that you know."
Johan Vromans writes:
: On Mon, Jul 31, 2000 at 09:50:11PM -0600, Nathan Torkington wrote:
: > So Larry is doing most of the evaluation for us. He's the one who
: > gave us the good things in the Perl language we have now. He'll be
: > the one vetoing the ridiculous ideas.
:
: Larry said: "Perl
> "CF" == Chaim Frenkel <[EMAIL PROTECTED]> writes:
> "TA" == Ted Ashton <[EMAIL PROTECTED]> writes:
TA> In general, they do what you want, unless you want consistency.
CF> Randal, Tom, et. al.
CF> How locked in to your brain is this lack of consistency? How un-perlish
CF> would it be t
> "TA" == Ted Ashton <[EMAIL PROTECTED]> writes:
TA> In general, they do what you want, unless you want consistency.
Randal, Tom, et. al.
How locked in to your brain is this lack of consistency? How un-perlish
would it be to cleanup, crypto-context, or the meaning of a list in
a scalar co
Thus it was written in the epistle of Tom Christiansen,
> Thank you for your compliments.
>
> > Would you be willing to give us a first shot at what Perl *is* to get the
> >discussion going?
>
> Only as slogans; deep analysis will require ascending a nearby summit.
>
> "Perl is a language
On Tue, Aug 01, 2000 at 08:00:54AM -0600, Tom Christiansen wrote:
> I did the "What is Perl?" thing to focus folks on what this was
> really for, since many seem to be trying to create a new and different
> language now. And you've said all that here just fine.
Bingo. We're redesigning *Perl*. W
Thus it was written in the epistle of Tom Christiansen,
> >This is why we need people what Perl *is* to get on the language list
> >and fight the incoming. Perl 6 is meant to be the next version of Perl,
> >not the bastard child of Python and Java.
>
> Could have fooled me. :-(
>
> I suggest tha
Moving the discussion to perl6-language:
Thus it was written in the epistle of Nathan Wiger,
> Chaim Frenkel wrote:
> >
> > Language
> > -> Obsolete Features
> > -> 1. Formats are not commonly used
> >
> > I'm sorry where did this come from. I use formats regularly and quite
> > use
On Mon, Jul 31, 2000 at 09:50:11PM -0600, Nathan Torkington wrote:
> So Larry is doing most of the evaluation for us. He's the one who
> gave us the good things in the Perl language we have now. He'll be
> the one vetoing the ridiculous ideas.
Larry said: "Perl5 was my rewrite of Perl, Perl6 wi
Great. Let's see if/how this list works.
Edwin Wiles wrote:
> I've already thrown a few notes together for a perl5 module, but nothing
> I'm ready to share just yet. I need to dig through CPAN to make sure
> I'm not reinventing something.
When you are ready to share, I'll be glad to peruse.
On Mon, 31 Jul 2000, Edwin Wiles wrote:
> Theoretically, we do have a list now. I'm going to try using it. It's
> also a personal experiment, since I'm subscribed to 'all', but not to
> 'language'.
>
Works for me. Thanks, Ask!
> Not if I can help it! I've run into some fairly complex binar
Theoretically, we do have a list now. I'm going to try using it. It's
also a personal experiment, since I'm subscribed to 'all', but not to
'language'.
I've already thrown a few notes together for a perl5 module, but nothing
I'm ready to share just yet. I need to dig through CPAN to make sure
56 matches
Mail list logo