From: Larry Wall <[EMAIL PROTECTED]>
   Date: Fri, 15 Apr 2005 12:52:53 -0700

   On Fri, Apr 15, 2005 at 02:38:36PM +0200, Leopold Toetsch wrote:
   : I'm not quite sure, but it seems that some of the MMD functions may 
   : better be vtable methods:
   : 
   : - bitwise_sh[rl]*    shift by anything other then int?

Shifting right by a positive BigInt (or left by a negative BigInt) can
be optimized to -1 or 0.  Shifting the other way could still produce a
valid result for some values, even on a machine with 32-bit addresses.

   : - bitwise_lsr        is missing generally
   : 
   : or even just a plain opcode only:
   : 
   : - logical_{or,and,xor}  return a PMC depending on the boolean value
   : 
   : What are HLLs expecting of these infix operations?

   Perl 6 tends to distinguish these as different operators, though Perl 5
   did overload the bitwise ops on both strings and numbers, which newbies
   found confusing in ambiguous cases, which is why we changed it.

[FWIW, Common Lisp can't use these ops, as it has a different idea of
logical truth.  And that's the honest (not nil).  ;-} ]

   : OTOH it might be useful that the current get_<type>_keyed operations 
   : (postcircumfix:[]) become MMD subroutines:
   : 
   :   Px = Py[Pz]    Pz = String, Int, Key, Slice, ...

   At the moment, the Perl 6 optimizer is explicitly allowed to optimize
   array indices with the assumption that the subscript is a scalar
   (or slice) of integer, or something that converts to integer . . .

   Larry

By the same token, couldn't one reasonably ask for a boolean array that
required BigInt subscripts, even on said 32-bit machine?  (Once boolean
arrays actually store one element per bit, that is.)  Or are subscripts
this large ruled out?

   Or are you using "integer" conceptually to include both Integer and
BigInt?

                                        -- Bob Rogers
                                           http://rgrjr.dyndns.org/

Reply via email to