Oh, I see the problem. The index() operation provides a slice, but if you
update the child value, where does it update the parent?

OK, Henning, I'm afraid this will have to wait until somebody understands
PP better, which will hopefully come this summer.

David

On Thu, Feb 23, 2012 at 12:38 PM, Chris Marshall <[email protected]>wrote:

> Unfortunately, it might not be that simple.  There
> seems to be a number of possible ways to interpret
> index operations with a bad value: bad index value
> corresponds to a missing index, a bad index value
> corresponds to an invalid index, and the result
> would also be the same as a good index value
> selecting a source element with a bad value.
>
> --Chris
>
> On Thu, Feb 23, 2012 at 9:30 AM, Henning Glawe <[email protected]> wrote:
> > On Thu, Feb 23, 2012 at 07:35:48AM -0600, David Mertens wrote:
> >> This seems like a reasonable design to me. However, is the croaking
> behavior
> >> documented or tested?
> >
> > It is documented as such in the POD of /usr/lib/perl5/PDL/Slices.pm:
> >
> >    index barfs if any of the index values are bad.
> >
> >> If so, this sort of change would introduce an
> >> incompatible change to a documented feature, which I would oppose. In
> that
> >> case, we could set a global or (for Perl 5.10 and up) a lexical flag to
> control
> >  this behavior.
> >
> > This seems like a reasonable solution to me.
> >
> > --
> > c u
> > henning
> >
> > _______________________________________________
> > Perldl mailing list
> > [email protected]
> > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>



-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to