Re: pack/unpack is damn unperlish. Explain them as Perl.
[email protected] (Michael G Schwern) Mon, 18 Sep 2000 14:05:37 -0400
| Newsgroups | perl.perl6.language,perl.perl6.language.data |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Sep 18, 2000 at 11:23:21AM -0400, John Porter wrote: > Uh huh... Are you prepared to write an explanation of Perl arrays > without making any mention of Perl scalars? "An array is a container for a list. Items in the list can be added, changed and removed, taken off and put onto both ends and even swapped around." Language pedants will scream (please don't), but this is good enough to get the reader's brain off the ground. It conveys the basic ideas of what an array is and what its good for while requiring a minimum of computing knowledge. Once the basics are applied, THEN you can start explaining that the items are scalars, and what scalars are, and the subtle differences between lists and arrays, etc... Also, your challenge is not quite fair. The average Perl programmer must learn about arrays and scalars in order to get anything done in Perl. Teaching them simultaneously, or teaching one while assuming knowledge of the other is acceptable. I *never* need to know what a "hex string (low nybble first)" is in day-to-day Perl. -- Michael G Schwern http://www.pobox.com/~schwern/ [email protected] Just Another Stupid Consultant Perl6 Kwalitee Ashuranse "You are wicked and wrong to have broken inside and peeked at the implementation and then relied upon it." Tom Christiansen in <31832.969261130@chthon>