Comments (otherwise you have things pretty much right):
> Every subrotine or variable or method or object can have a "notes" (out of bound >data) out-of-band data > we can even have hyper-assignment : > > my ($a, $b) ^= new Foo; This is unlikely to do what you wanted. It creates a new Foo object and then assigns a reference to that one object to both $a and $b. It doesn't create two Foo objects. (But maybe one object referenced twice is what you wanted). > Let's someone of the anti-perl camp tell me that this "upper-cap noise" makes the >code hard to read and I will smash him with a hammer in the head :") and leave him to >type "from here to tommorow loop after loop after loop after loop" :"). Gees those >perl designers with LW in the head are mad-scientists ..... Do you really need to say this? > 7.) Quantum superpositions =============== > if ($x == any($a, $b, $c) { ... } > > if any of the variables equals $x then the code will be executed. Probably we will >be able to say : > > $x ^== ($a,$b,$c) > > too. The difference as I understand it in that particular case is [?? correct me if >i'm wrong ??] : > case1 - superposition : > > if ($x == $a || $x == $b || $x == $c) { ... } Correct. > > case2 - hyperoperator : > > my $result = 0; > for ($a,$b,$c) { > if ($x == $_) { $result =1; last} > } Not correct. The second case is the same as: ($x == $a, $x == $b, $x == $c) which reduces in effect to: $x == $c > while ($nextval < all(@thresholds) { ... } > > This time all() binds the @threshold with && not with || as it was with any(). It's equivalent to: while ($nextval < @thresholds[0] && $nextval < @thresholds[1] && ...) { ... } > $max = any(@value) < all(@values); That's: $max = any(@values) >= all(@values); > and all they (except CATCH) are in fact proprietes of the block So is CATCH. > [?? the apo4 uses undo instead of keep, 'm I right ??] It uses both, because they have different effects. undo(...) is only invoked if the block "fails", keep(...) is only invoked if the block "succeeds". > CATCH { > when Error::DB {}; > when Error::XX {}; > } > > is : > > CATCH $! { > when $!.isa(Error::DB) {}; > when $!.isa(Error::XX) {}; > default die;#!! not sure > } No, it's equivalent to: switch $! { when .isa(Error::DB) {} when .isa(Error::XX) {} default { die; } } > try { ... } > > is equivalent to: > > try { ... CATCH { default { } } } Except it also returns C<undef>. > for @a; @b; @c -> $x { ... } > > One at a time across all arrays sequentally i.e. @a[0],@a[1],...@b[0], @b[1], ..., >@c[0], @c[1], ... . No. This one pulls one from each array in turn. i.e. @a[0], @b[0], @c[0], @a[1], @b[1], @c[1], @a[2], @b[2], @c[2],... Damian