Perl Style: Data-Oriented Programming
- Data structures are more important than code.
- Rob Pike says: `Data dominates. If you've chosen the right data
structures and organized things well, the algorithms will almost
always be self-evident. Data structures, not algorithms, are central to
programming. (See Brooks p. 102.)'
- Capture regularity with data, irregularity with code. (Kernighan)
- If you see similar functionality in two places, unify it.
That is called a `subroutine'.
- Consider making a hash of function pointers to represent
a state table or switch statement.
Forward to Configuration Files
Back to Break Programs into Separate Processes
Up to index
Copyright © 1998, Tom Christiansen
All rights reserved.