Re: $arrayref.ref?

2005-07-31 Thread Ingo Blechschmidt
Hi, Larry Wall wrote: > On Sat, Jul 30, 2005 at 02:14:52PM +0200, Ingo Blechschmidt wrote: > : http://use.perl.org/~autrijus/journal/25337: > : > deref is now 0-level; $x = 3; $y = \$x; $y++. # now an exception > : > : my $arrayref = [1,2,3]; [...] > : say $arrayref.isa("Ref"); # true

zip with ()

2005-07-31 Thread Andrew Shitov
Hi, I tried zip under pugs. my @odd = (1, 3, 5, 7); my @even = (2, 4, 6, 8); my @bothA = zip @odd, @even; print @bothA; This code prints 12345678 as expected. After parenthesis were used to group zip arguments, results changes to 13572468. Is it right? -- __

Re: Curious use of .assuming in S06

2005-07-31 Thread Luke Palmer
On 7/29/05, Autrijus Tang <[EMAIL PROTECTED]> wrote: > In S06's Currying section, there are some strange looking examples: > > &textfrom := &substr.assuming(:str($text) :len(Inf)); > > &textfrom := &substr.assuming:str($text):len(Inf); > > &woof ::= &bark:(Dog).assuming :pitch; > >

Re: Messing with the type heirarchy

2005-07-31 Thread Dave Whipp
Luke Palmer wrote: Everything that is a Num is a Complex right? Not according to Liskov But this is one of the standard OO >>paradoxes, and we're hoping roles are the way out of it. Well, everything that is a Num is a Complex in a value-typed world, which Num and Complex are in. I do

Stringification of pairs

2005-07-31 Thread Ingo Blechschmidt
Hi, quick question: my $pair = (a => 1); say ~$pair; I assume that outputs "a\t1", because of the "pairs can pretend to be one-element hashes"-rule. Correct? --Ingo -- Linux, the choice of a GNU | We are Pentium of Borg. Division is futile. generation on a dual AMD | You will be ap

Eliminating &{} and *{}

2005-07-31 Thread Autrijus Tang
Under my current design of containers (see "definition of containers" on p6c), there are only Scalar, Array and Hash containers. This is in accordance to them being the only first-class data structures that deals with mutable data storage. This is similar to JVM's division between scalar data and