3 ms·
Your example looks like a sequence of procedure calls that interact implicitly via global data. Yuck.
by pklausler 10y ago
Your example looks like a sequence of procedure calls that interact implicitly via global data. Yuck.
- EdwardCoffin 10y agoI used to think that was necessarily bad, but I take a less dogmatic view of such things now. You might find this post by John Cormac (of Quake fame) of interest: John Cormac on Inlined Code [1]. I now think such an approach has its place in some domains, and this might be one of them. [1] http://number-none.com/blow/john_carmack_on_inlined_code.html http://number-none.com/blow/john_carmack_on_inlined_code.htm...
- EliRivers 10y agoTell you what, replace the bits you don't like with something involving objects, or functional programming, or whatever your particular favourite is. It's just an example and the bit you've focussed on is the least meaningful part. Of everything there, it's the most trivial and the part that could be radically changed and make no difference at all.