Re: perl 6 requirements
[email protected] (Ted Ashton) Mon, 31 Jul 2000 14:40:42 -0400
| Newsgroups | perl.bootstrap |
|---|---|
| Message-ID | <[email protected]> |
Thus it was written in the epistle of Hildo Biersma, > > This leads down the road to the "pack/unpack" scenario: really the primary > > use for pack/unpack is to access/present data from/to type-checked, > > non-scalar interfaces (structs, objects, arrays of X, whatever). > > Why? Let perl do the work for you. I known that perl will always be > able to store an integer of any size in a normal untyped scalar. If I > want to store an arbitrary scalar, the language could define that (a) an > out of range value is truncated or (b) an out of range value throws an > exception. If I want to cast everything, I would be coding C++ in the > first place, you could in perl to get away from all that... Hildo, P'raps you've not run across it, but there are situations where one is given a datastructure created by another language (in my case, usually through being handed a file with records built by a certain structure). I have to unpack those records, deal with the data, and likely pack up the data as a fixed-size record to ship on to the next (non-Perl) thing. If I could define a data structure with fixed sizes and just say, "put the data in this space, here," it would save my unpack and pack. HTH, Ted P.S. And no, I really don't want to switch to C++, avoiding fixed data sizes was not the only reason I switched to Perl :-). -- Ted Ashton ([email protected]), Info Sys, Southern Adventist University ========================================================== For the things of this world cannot be made known without a knowledge of mathematics. -- Bacon, Roger ========================================================== Deep thoughts to be found at http://www.southern.edu/~ashted