>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
DS> That's a good question. Now that we have a list of bitwise ops, we
DS> can decide how they work. What happens when you
DS> rotate/shift/bit-or a float? Or a bitint/bigfloat? Or a string?
DS> Important questions, and we can hammer something out now that we
DS> know what they are.
GACK!! i did that very thing when writing a PL/I any-to-any library. it
really did any of 11 types to any of 11 types conversion, one of which
was float to bit string. the problem is that is platform specific to an
extreme. even if you have ieee floats, the byte ordering is subject to
endian issues. i would not like to see perl ops that have so little care
about portability. we should look into how other langs specify some of
these wacky conversions and see what we can learn from that.
actually pack supports float to bit conversion in some way. you can pack
a float into a byte string. no specs on byte ordering or anything else
are in the docs.
also perl5 has minimal support for bit strings. the Bit::Vector library
has many useful functions. we should design our bit string ops to
support a similar set of operations (maybe not all of them). then that
could be loaded too on demand like math when any of them are
called/compiled in.
along the way we will have to be very clear about our bit string
definitions.
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs -------------------------- http://jobs.perl.org