Re: Justification for the "reversed" instruction format

2016-09-08 Thread Trey Harris
Ah, nice, good to know my concern was unwarranted. On Thu, Sep 8, 2016 at 3:04 PM Aaron Sherman wrote: > In Perl 6, we apply those constraints when you pass off the call to the > ultimate recipient, and that's important because that recipient can have > multiple signatures (and

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Trey Harris
On Thu, Sep 8, 2016 at 9:23 AM Aaron Sherman a...@ajs.com wrote: I don't know Haskell, but isn't flip just: > > sub flip() { -> $b, $a, |c { f($a, $b, |c) } } > > And then: > > perl6 -e 'sub flip() { -> $a, $b, |c { f($b, $a, |c) } }; my = flip > yas(1,2,3)' > 213 >

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Aaron Sherman
In Perl 6, we apply those constraints when you pass off the call to the ultimate recipient, and that's important because that recipient can have multiple signatures (and signatures can be added *after* you define the flip). For example: $ cat foo.p6 sub flip() { -> $b, $a, |c { f($a, $b, |c) }

The use of $!attr vs self.attr in core libraries

2016-09-08 Thread Aaron Sherman
In working with Range a while back, I was frustrated to find that writing a subclass that wanted to override an accessor (e.g. for $.min and $.max) was quite difficult because most methods ignored the accessors and called $!min and $!max or wrote to them directly. If I really wanted to change the

Re: Justification for the "reversed" instruction format

2016-09-08 Thread Aaron Sherman
I don't know Haskell, but isn't flip just: sub flip() { -> $b, $a, |c { f($a, $b, |c) } } And then: perl6 -e 'sub flip() { -> $a, $b, |c { f($b, $a, |c) } }; my = flip yas(1,2,3)' 213 Aaron Sherman, M.: P: 617-440-4332 Google Talk, Email and Google Plus: a...@ajs.com Toolsmith, developer,