Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: 5x6-bit values into/out of a 32-bit word

by grinder (Bishop)
on Mar 18, 2007 at 15:04 UTC ( [id://605361]=note: print w/replies, xml ) Need Help??


in reply to Re^4: 5x6-bit values into/out of a 32-bit word
in thread 5x6-bit values into/out of a 32-bit word

Don't take things so literally.

Of course we know our 6 times tables. And the computer is already switched on.

What if your requirements change, and it's 7 4-bit values, or 10 3-bit values? In my code, you only have to change one or two initialisers. In Thelonius's code you have to rework nearly all of it. Even if the particular edits are trivial, there are far too many.

It's a variant on the Don't Repeat Yourself principle. I am surprised you didn't grasp this.

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://605361]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-03-28 12:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found