On Thu, Sep 21, 2006 at 10:20:20PM -0700, Jonathan Lang wrote:
: Two questions:
:
: 1. How would the capture sigil affect the use of capture objects as
: replacements for perl5's references?
I don't see how it would have any effect at all, unless the P5 ref happened
to be to a typeglob, or had
Larry Wall wrote:
Jonathan Lang wrote:
: Two questions:
:
: 1. How would the capture sigil affect the use of capture objects as
: replacements for perl5's references?
I don't see how it would have any effect at all, unless the P5 ref happened
to be to a typeglob, or had both array and hash
On Fri, Sep 22, 2006 at 12:32:27AM -0700, Jonathan Lang wrote:
: Larry Wall wrote:
: Jonathan Lang wrote:
: : Two questions:
: :
: : 1. How would the capture sigil affect the use of capture objects as
: : replacements for perl5's references?
:
: I don't see how it would have any effect at all
Larry Wall wrote:
You don't need to use | to store a capture any more than you need @ to
store an array. Just as
$x = @b;
@$x;
gives you the original array,
Huh. I'm not used to this happening. So what would the following
code do, and why?
my @b = ('foo', 'bar');
my $x =
Jonathan Lang wrote:
Larry Wall wrote:
You don't need to use | to store a capture any more than you need @ to
store an array. Just as
$x = @b;
@$x;
gives you the original array,
Huh. I'm not used to this happening. So what would the following
code do, and why?
my @b = ('foo',
Aaron Sherman wrote:
IMHO most of the confusion here goes away if capture variables ONLY
store parameter-list-like captures, and any other kind of capture
should, IMHO, permute itself into such a structure if you try to store
it into one. That way, their use is carefully constrained to the
Larry Wall wrote:
Okay, I think this is worth bringing up to the top level.
Fact: Captures seem to be turning into a first-class data structure
that can represent:
argument lists
match results
XML nodes
anything that requires all of $, @, and % bits.
Also;
role
Two questions:
1. How would the capture sigil affect the use of capture objects as
replacements for perl5's references?
2. With the introduction of the capture sigil, would it be worthwhile
to allow someone to specify a signature as a capture object's 'type'?
That is:
my :(Dog: Str $name
Okay, I think this is worth bringing up to the top level.
Fact: Captures seem to be turning into a first-class data structure
that can represent:
argument lists
match results
XML nodes
anything that requires all of $, @, and % bits.
Fact: We're currently going through
In a message dated Wed, 20 Sep 2006, Larry Wall writes:
The obvious ASCII for ¢ would be c/ or C/ or c| or c| or maybe just |.
I like ¢,but:
c/$foo # ASCII of ¢$foo
d/$foo # d() divided by $foo
is rather confusing. (Same goes for |).
So the Term Term exclusion makes me rather lean
Oops, I hate typos that result in my writing exactly the opposite of what
I meant:
In a message dated Wed, 20 Sep 2006, Trey Harris writes:
In a message dated Wed, 20 Sep 2006, Larry Wall writes:
The obvious ASCII for ¢ would be c/ or C/ or c| or c| or maybe just |.
I like ¢,but:
c/$foo
Larry Wall wrote:
Okay, I think this is worth bringing up to the top level.
Fact: Captures seem to be turning into a first-class data structure
that can represent:
argument lists
match results
XML nodes
anything that requires all of $, @, and % bits.
This is quite true, and
On 9/20/06, Larry Wall [EMAIL PROTECTED] wrote:
Conjecture: We need a corresponding sigil to request captureness.
As with @ and %, you can store a capture in a $ to hide it, but we
don't have the ability to have capture variables that know how to
behave like captures without fakey syntactic
On Wed, Sep 20, 2006 at 12:28:10PM -0700, Larry Wall wrote:
Bikeshed: What should that sigil be? And if it's in Latin-1, what's the
ASCII workaround?
The one that springs out to me is:
¤ 00A4CURRENCY SIGN
Probably because it looks like a container with something
On Wed, Sep 20, 2006 at 05:18:12PM -0400, Aaron Sherman wrote:
: Consider this the first test of the first-classness of objects in Perl
: 6. You have an object that's something not entirely unlike:
:
: class Capture { has $.scalar; has @.array; hash %.hash }
:
: I think the addition of a
Larry Wall writes:
Conjecture: We need a corresponding sigil to request captureness. As
Bikeshed: What should that sigil be?
What's * doing these days?
Smylers
On Thu, Sep 21, 2006 at 12:45:46AM +0100, Smylers wrote:
: Larry Wall writes:
:
: Conjecture: We need a corresponding sigil to request captureness. As
: Bikeshed: What should that sigil be?
:
: What's * doing these days?
Thought a lot about that one, but I think it's more useful in 0..*
and
to in
this case, so that we can catch such errors.
...
In my current thinking that's just \( |$othercap, $a, :$b ).
Yep, if |$ is the capture sigil (making | the sigil prefix op) then this
is a fairly obvious extrapolation from your previous messages.
: Calling subroutines with such a thing looks
of the Capture sigil
enough to indicate that the rvalue should be treated as a capture
object?
$¤args; # would this return 1 or an indication that
nothing's there?
@¤args; # would this return [1, 2, 3], or [2, 3]?
%¤args; # this would return { mice - 'blind' }
Would
19 matches
Mail list logo