This is a bit limiting. 

I'd offer a more flexible approach. We should be able to represent
any packed structure. We should be able to handle anything that an
pack/unpack format can currently handle. Except that the data does
not have to be moved out into an array/hash. 

This might fit in with the n-dim arrays for the PDL folks. Perl
should be able to work with data in its native form. Hmm, this
might actually make passing data between the future XS and perl
a lot easier. The XS would not have to unpack or hide too much.
The raw structures could be passed between perl and the XS unchanged.

One thing that C and XS does not give you, are the COBOL redefines
capabilities. Union is probably the closest. But a method of saying
that there are two descriptive overlays of the same memory area
would be nice.

I could have used it for some of the COBOL files that I have to
play with in my day job.

<chaim>

>>>>> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes:

PRL> =head1 ABSTRACT


PRL> We adopt C base types, and C structure syntax.


PRL> =head1 DESCRIPTION


PRL> the C programming language has a flexible and efficient method
PRL> of describing the hardware representation of packed data:  the
PRL> C<struct> keyword.

PRL> C has several variable types: C<int>, C<float>, and C<char>
PRL> are the standard ones, and the "derivative" ones are C<double>, C<short>
PRL> and any of the above prefixed with C<unsigned>.

PRL> Perl6 will use these types as well as the familiar perl types, which will
PRL> all appear in packable defined types as a memory address pointer.

PRL> The equivalent of C's C<struct> keyword will be our qs{} structure quoting 
operator, which can take the same arguments as a C<struct> block and produce
PRL> an equivalent description (a "type definition") of a block of memory, which
PRL> is called a "struct." (rather than a "pseudohash" which is something
PRL> that acts very similar but has a different internal representation.)

PRL> Or we could use the C<struct> keyword as well, so that the C

-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to