develooper Front page | perl.perl6.internals | Postings from February 2006

WRT *BooleanArray

Thread Previous | Thread Next
From:
Bob Rogers
Date:
February 20, 2006 08:23
Subject:
WRT *BooleanArray
Message ID:
17401.60674.202288.214889@rgrjr.dyndns.org
   From: Leopold Toetsch <lt@toetsch.at>
   Date: Mon, 20 Feb 2006 14:55:03 +0100

   *) I don't think that *BooleanArray should support:

      set P0[0], 3.2
      set P0[1], "foo"
      set P0[2], P1

So I would need to do

	set I1, P1
	set P0[2], I1

in order to store the contents of a PMC into a boolean array?  What do I
do if I don't know the type of the destination array when I am compiling
this code?

   nor

      set N0, P[0]
      ...

   et al. I think, if you use a BooleanArray with compact storage you are 
   knowing why and don't need automatic conversion to/from float, string, 
   nor PMC.

   What do you think?
   leo

That would mean that I can't pass a boolean array to code that wants to
operate on a generic array, which seems limiting.

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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About