Re: Hooks
Tom Plunket <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
Mat Noguchi wrote: >> It may seem like you need static state, somewhere to start things off, but >> you don’t. You start off by creating an object, and you keep your state in >> that object and in objects it references. In Newspeak, those objects are >> modules. > > I mentally replaced “static” with “private” and it still made sense. The larger the set of operations on a data set, the more it resembles static aka global state. Pushing globals into static classes is no more a solution than pushing tons of mutable data into classes with dozens of functions. If you're looking to reduce surface area, you've got to reduce the API that manipulates each bit of data. > Once I made that leap, writing maintainable (at least for me) code became a > lot easier. What leap? That a global search&replace for (private|protected) to public was The One True Path? That does nothing to minimize surface area. -tom! -- _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com