Re: sparse components
Emil Dotchevski <[email protected]>
| Newsgroups | gmane.games.devel.sweng |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 28, 2010 at 11:07 AM, Warrick Buchanan <[email protected]> wrote: > Perhaps this summary may aid yours and others thinking: > 1) Never forget the CPU loads data from memory transforms it (in > Acton-speak) and writes the modified data out > 2) It doesn't transform just one input and produce one output - it processes > streams of data whether or not you choose to see it that way > 3) The natural unit of program composition is not a conceptional 'OO' object > but functions that transform an input stream to an output stream (stream or > list) > 4) It sounds simple and obvious and it is - but decades of 'OO' teaching > have obscured this fact in many peoples minds > 5) Functional decomposition leads to extremely reusable code without the > awkwardness OO constructs can introduce > 6) By functional decomposition I mean your function only reads its input and > writes its output and touches no hidden shared state inside > 7) If you view the input and output parameters that are connecting your > functions as asynchronous streams rather than instant value parameters I > would suggest writing concurrent code becomes much easier > 8) Such parameter streams can be implemented as message passing lockless > queues (Forget STM) and functions can be invoked when they have parameters > to process by kicking them to a pool of worker threads That's called Erlang. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode _______________________________________________ Sweng-Gamedev mailing list [email protected] http://lists.midnightryder.com/listinfo.cgi/sweng-gamedev-midnightryder.com