Re: [Alephmodular-devel] Detangling/de-Mac-ifying
Status: Pre-Alpha
Brought to you by:
brefin
From: Br'fin <br...@ma...> - 2005-05-19 06:14:20
|
On May 18, 2005, at 11:29 PM, Woody Zenfell III wrote: > On Wednesday, May 18, 2005, at 09:01 PM, Chris Pickel wrote: > > >> I'll of course put in my usual "make it a class!" line, since if >> there's a CActionFlags class, sticking a mutex in at a later date >> would be much easier. >> > > Yes, bringing to bear language features we have now that were not > as available to Bungie when they wrote this stuff seems like > generally good practice. It also seems in line with AM's > character. The speculative nature of the latter part of your > statement sets me on edge a little, but perhaps it's intended as an > example of how proper use of language features and abstractions > smooths development, rather than a suggestion that developers > attempt to predict the future. :) > > I thought in A1 I _had_ made ActionQueues objects, since there are > several different sets of them in A1 . . . but maybe I'm confusing > some things in my memory. It's been years. A1 I think did, but I've not looked into it since I hadn't really considered working on such on AM Yet. I'm not against it, just my focus wasn't there. >> Random side note - glancing through the code, there are plenty of >> #define's still around. Converting them to const's and inlined >> functions might be a good idea for the future. Of course, many are >> things which MML is used to define in A1, so their final >> implementation might not be constants. But this is random and not >> the subject of this email. >> > > Replacing #defines with safer language features also seems like > good practice. So does typedef'ing certain things, like > action_flags. And don't worry about trying to predict the "final > implementation" - it'll evolve and grow up the way it should, if > properly tended along the way. Make things the best way you can > figure out now, for what they need to be now (e.g. by doing exactly > the kinds of things you're talking about) - it'll then be that much > easier to see how the code really wants to be, and that much easier > to adapt it once you do know where it needs to go next. > > Woody In general, I do agree with doing typesafe things with language features and inline functions. I haven't done any specific attacks on excising them all. Though I've looked at a few specific ones and wondered... what the heck and I going to do about this? (Most specifically things like MAX() and NONE where they flex more in the context the number and values being used are expressed in) -Jeremy Parsons http://alephmodular.sourceforge.net/ |