develooper Front page | perl.perl6.language | Postings from September 2000

Re: pack/unpack is damn unperlish. Explain them as Perl.

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
September 18, 2000 11:10
Subject:
Re: pack/unpack is damn unperlish. Explain them as Perl.
Message ID:
20000918141038.K17371@athens.aocn.com
On Mon, Sep 18, 2000 at 12:31:34PM -0400, Casey R. Tweten wrote:
> I think pack/unpack are perlish enough.  Especially if we believe that
> printf/sprintf are perlish.

Interpolation is perlish.  printf and sprintf are not.  And for
similar reasons as pack/unpack.  "%e a floating-point number, in
scientific notation".

People don't trip over s/printf as much for several reasons: 

  Anyone who's written even the slightest amount of C has used printf().
  Even if you haven't, there's high odds that someone around you has and can
  help.

  printf() has a direct analogy to print().  "printf is like print, except..."
  which makes it much easier to explain.  It provides that bit of mental
  runway to get the reader's mind off the ground.

  The differences between sprintf and printf are very easy to explain.
  "Equivalent to C<print sprintf>"

-- 

Michael G Schwern      http://www.pobox.com/~schwern/      schwern@pobox.com
Just Another Stupid Consultant                      Perl6 Kwalitee Ashuranse
I SEE A RED ASS AND I WANT TO PASTE IT BLACK
WON'T OPEN ANYMORE I PASTED UP THE CRACK
        -- swansong

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