On 9/9/05, Juerd <[EMAIL PROTECTED]> wrote:
> I am glad "item" is as official as it gets, but I have no personal
> favourite between "list" and "slurpy". Please, list members, start a
> flame w^W^Wdiscussion about this so that it can be settled.
I'll fire the first shot: type names should be nouns
Larry Wall skribis 2005-09-09 16:45 (-0700):
> It's item and list, I think.
Pugs uses CxtItem and CxtSlurpy.
I am glad "item" is as official as it gets, but I have no personal
favourite between "list" and "slurpy". Please, list members, start a
flame w^W^Wdiscussion about this so that it can be s
On Sat, Sep 10, 2005 at 12:36:26AM +0200, Juerd wrote:
: Are "item context" and "slurpy context" official terms yet? (Note that
: "official" is temporary, not permament, and has nothing to do with
: things being set in stone.)
:
: If so, then are the keywords for forcing context also "item" and
:
Are "item context" and "slurpy context" official terms yet? (Note that
"official" is temporary, not permament, and has nothing to do with
things being set in stone.)
If so, then are the keywords for forcing context also "item" and
"slurpy", rather than "scalar" and "list"?
Juerd
--
http://convo
On Fri, Sep 09, 2005 at 08:02:32PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: # Should this work?
: say (a => 1, b => 2); # 2 or error?
:
: # Similarily:
: my @array = (a => 1, b => 2);
: say @array;
:
: my $arrayref = [ a => 1, b => 2 ];
: say $arrayref;
:
: FWIW, I
Hi,
# Should this work?
say (a => 1, b => 2); # 2 or error?
# Similarily:
my @array = (a => 1, b => 2);
say @array;
my $arrayref = [ a => 1, b => 2 ];
say $arrayref;
FWIW, I think accessing arrays and arrayrefs by key should probably not
work, but I'm unsure on (...
Larry Wall skribis 2005-09-09 8:58 (-0700):
> The decision to copy is made by the =, not by @a. This also copies:
> ($a,$b) = ($b,$a)
> This is how Perl 5 assignment works, and we're trying not to break that...
This is all true.
However, back to the scalar case, assuming the comma/alias thi
On Fri, Sep 09, 2005 at 04:58:37PM +0200, Ingo Blechschmidt wrote:
: Hi,
:
: Juerd wrote:
: > Infix? Infix operators are binary, comma is not.
That infix operators are always binary is just a cultural assumption
based on the historical restriction to right-associative and
left-associative operato
On Fri, Sep 09, 2005 at 05:35:42PM +0200, Ingo Blechschmidt wrote:
: my @a = (1,2,3); # @a's STORE method recognized that the RHS
: # is an aggregate, so it created new containers.
The decision to copy is made by the =, not by @a. This also copies:
($a,$b) = ($b,$a
On Fri, Sep 09, 2005 at 08:46:06AM -0700, Larry Wall wrote:
: If these are really postfix operators, then we can also write
:
: Foo .::{}
: Foo .::<>
: Foo .::()
But I don't think they can really be postfix. At least, ::() isn't, since
$Foo .::($bar)
would not be the same as we
On Thu, Sep 08, 2005 at 07:41:52PM -0400, Stevan Little wrote:
: So it would be Foo::.keys() then?
:
: Would this be possible?
The more I think about it, the more I'm leaning toword postfix
operators ::{} and ::<>, essentially in same syntactic niche as ::().
Which means you'd have to write that
Hi,
Larry Wall wrote:
> On Fri, Sep 09, 2005 at 04:40:11PM +0200, Juerd wrote:
> : Ingo Blechschmidt skribis 2005-09-09 15:12 (+0200):
> : > I agree that the comma operator creates an anonymous array, but I
> : > do not agree that it behaves as if it has [] around it.
> : >
> : > Creating an anon
Hi,
Juerd wrote:
> Ingo Blechschmidt skribis 2005-09-09 15:12 (+0200):
>> I agree that the comma operator creates an anonymous array, but I do
>> not agree that it behaves as if it has [] around it.
>>
>> Creating an anonymous array does not require creating new containers
>> --
>
> So comma in
On Fri, Sep 09, 2005 at 04:40:11PM +0200, Juerd wrote:
: Ingo Blechschmidt skribis 2005-09-09 15:12 (+0200):
: > I agree that the comma operator creates an anonymous array, but I do not
: > agree that it behaves as if it has [] around it.
: >
: > Creating an anonymous array does not require creati
Ingo Blechschmidt skribis 2005-09-09 15:12 (+0200):
> I agree that the comma operator creates an anonymous array, but I do not
> agree that it behaves as if it has [] around it.
>
> Creating an anonymous array does not require creating new containers --
So comma in scalar context creates an array
Hi,
Juerd wrote:
> Ingo Blechschmidt skribis 2005-09-09 11:59 (+):
>> > > > \(@array,) is [ @array ], NOT map { \$_ } @array
>> > > I'm not sure of the []s, remember &postcirumfix:<[ ]> creates
>> > > *new* containers:
>> > That was the point.
>> > > [EMAIL PROTECTED] = $bar;
>> > > (@
Many apologies for triple posting - short-circuit between ears.
Peri Hankey
--
http://languagemachine.sourceforge.net - The language machine
Ingo Blechschmidt skribis 2005-09-09 11:59 (+):
> > > > \(@array,) is [ @array ], NOT map { \$_ } @array
> > > I'm not sure of the []s, remember &postcirumfix:<[ ]> creates *new*
> > > containers:
> > That was the point.
> > > [EMAIL PROTECTED] = $bar;
> > > (@array,)[0] = $bar;
>
Dave Whipp wrote:
If I want to parse a language that is sensitive to whitespace
indentation (e.g. Python, Haskell), how do I do it using P6 rules/grammars?
The way I'd usually handle it is to have a lexer that examines leading
whitespace and converts it into "indent" and "unindent" tokens. The
Hi,
Juerd convolution.nl> writes:
> Ingo Blechschmidt skribis 2005-09-06 21:24 (+0200):
> > > \(@array,) is [ @array ], NOT map { \$_ } @array
> > I'm not sure of the []s, remember &postcirumfix:<[ ]> creates *new*
> > containers:
>
> That was the point.
>
> > [EMAIL PROTECTED] =
Dave Whipp wrote:
If I want to parse a language that is sensitive to whitespace
indentation (e.g. Python, Haskell), how do I do it using P6
rules/grammars?
The way I'd usually handle it is to have a lexer that examines leading
whitespace and converts it into "indent" and "unindent" tokens. T
Dave Whipp wrote:
If I want to parse a language that is sensitive to whitespace
indentation (e.g. Python, Haskell), how do I do it using P6 rules/grammars?
The way I'd usually handle it is to have a lexer that examines leading
whitespace and converts it into "indent" and "unindent" tokens. The
22 matches
Mail list logo