If we create a few piddles of different types and cat them together, the output 
datatype is the same as the first piddle:

~~~perl
$by=xvals(byte,5)+253;
$so=xvals(short,5)+32766;
$lo=xvals(long,5)+32766;
$fl=float(xvals(5)+0.2);
$c1 = cat($by,$so,$lo,$fl);
$c2 = cat($lo,$so,$fl,$by);
$c3 = cat($fl,$lo,$by,$so);
print "\$c1: " . $c1->info . "$c1"; #is a byte
print "\$c2: " . $c2->info . "$c2"; #is a long
print "\$c3: " . $c3->info . "$c3"; #is a float
~~~

What I would expect is that the output has the same type as the piddle of the 
highest datatype.  That way cat(@list_of_piddles)->dog would actually be a 
symmetric operation.  Is that a reasonable expectation? 'glue' and 'append' 
both return a piddle of the highest input datatype.  Is there a good reason to 
have the datatype be based on the first piddle for 'cat' only?

It's not a hard change to make to 'cat', but I wanted to make sure I wasn't 
missing something.

Derek
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pdl-devel mailing list
pdl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-devel

Reply via email to