On Fri, Apr 20, 2001 at 09:58:13AM -0700, [EMAIL PROTECTED] wrote:
> 
> 
> Hello,
> 
> First of all, I'm sorry, this text is rather too long.

Wow.  So it is.  But based on high-speed glancing it looks rather good.
I found one spot that I want to comment right away.

[kilosnip]

> 1.2. The vtable

In general the extensibility (and the size) of the vtable worries me.
Should we have multilevel vtables?  Arithmetic subvtable, bitop
subvtable, et cetera?


>       // numeric operations

I would call this 'arithmetic', 'numeric' is a bit too general a term.

>       void  (*PLUS)       (SVAL *result, SVAL *this, SVAL *value);
>       void  (*MINUS)      (SVAL *result, SVAL *this, SVAL *value);
>       void  (*TIMES)      (SVAL *result, SVAL *this, SVAL *value);
>       void  (*DIVIDE)     (SVAL *result, SVAL *this, SVAL *value);
>       void  (*MODULUS)    (SVAL *result, SVAL *this, SVAL *value);

Exponentiation?  Negation?

Instead of modulus have a single function returning both the
integer part and the modulus?

What is someone wants to define matrices and have both cross product
and dot product?

The whole slew of other math functions: abs, sqrt, sin, log?  Where do
they fit in?  (See why multilevel vtables might be a good idea?)

>       // numeric ++ / --
>       void  (*INC)        (SVAL *result, SVAL *this);
>       void  (*DEC)        (SVAL *result, SVAL *this);

The difference of $s++ versus ++$s is implicit?

>       // bit operations
>       void  (*BITAND)     (SVAL *result, SVAL *this, SVAL *value);
>       void  (*BITOR)      (SVAL *result, SVAL *this, SVAL *value);
>       void  (*BITXOR)     (SVAL *result, SVAL *this, SVAL *value);
>       void  (*BITNOT)     (SVAL *result, SVAL *this);
>       void  (*BITSHL)     (SVAL *result, SVAL *this, SVAL *value);
>       void  (*BITSHR)     (SVAL *result, SVAL *this, SVAL *value);

Many new bitops have been suggested over the years: bit roll,
bit reverse.  I'm not saying they should be blindly added here,
I'm asking what if somebody wants to?

(Slightly OT: In Perl 6 we should also nail down the behaviour of the
sneaky bits like the signedness of modulus and the semantics of bitops
like shifts)

>       // numeric comparisons
>       int   (*NUMCMP)     (SVAL *this, SVAL *value);
>       int   (*NUMEQ)      (SVAL *this, SVAL *value);
>       int   (*NUMNE)      (SVAL *this, SVAL *value);
>       int   (*NUMLT)      (SVAL *this, SVAL *value);
>       int   (*NUMGT)      (SVAL *this, SVAL *value);
>       int   (*NUMLE)      (SVAL *this, SVAL *value);
>       int   (*NUMGE)      (SVAL *this, SVAL *value);

I'm not certain about the utility of having separate EQ NE LT GT LE GE.
If those are not deducible from CMP, we don't have a consistent comparison
function (we might get loops).

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to