Front page | perl.perl6.internals |
Postings from February 2001
Re: PDD 2, vtables
Thread Previous
|
Thread Next
From:
Branden
Date:
February 7, 2001 12:07
Subject:
Re: PDD 2, vtables
Message ID:
OE39kdavN3qljWwY0Vn00003c72@hotmail.com
Dan Sugalski wrote:
> Splitting the vtable into two pieces, with one piece not tied to a PMC,
> makes some things impossible. Consider this:
>
> @foo = @bar * @baz;
>
> where all three arrays are really matrix types.
By the PDD's notion of `key', what would be the `key' of a matrix type ?
(I think that's actually a -language question, but) What $foo[42] (where
@foo is matrix) would compile to?
>
> In the separate load/store
> and do vtable scheme it means you get the value of @bar and @baz in scalar
> context, and multiply the results. Two operations, and the resultant
values
> are sanitzed. In the single vtable scheme, we'd execute @bar's multiply
> routine, which would be clever enough (because we wrote it that way) to
see
> the second parameter's also a matrix, and do matrix math.
>
Actually, not necessarily. It depends of what the compiler does... There
could be special entries for array operations, like +/-/*/... . The problem
I see with it is what happens when you @a = @b. Actually, if @b is a matrix,
@a = @b makes @a a matrix or evaluates @b in list context? What about @a =
(@b) ? What if @a is a tied array? This matrix thing is actually getting
very confusing to me... I think all these proposed additions to the language
should be carefully examined for possible mis-interpretations like these.
- Branden
Thread Previous
|
Thread Next
-
PDD 2, vtables
by Dan Sugalski
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by Branden
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by David Mitchell
-
Re: PDD 2, vtables
by Dan Sugalski
-
Re: PDD 2, vtables
by Simon Cozens
-
Re: PDD 2, vtables
by Dan Sugalski
-
Re: PDD 2, vtables
by Edwin Steiner
-
Re: PDD 2, vtables
by Dan Sugalski
-
Re: PDD 2, vtables
by Tim Bunce
-
Re: PDD 2, vtables
by Branden
-
Re: require < 6.x
by Brent Dax