Time for a little Object-Oriented refactoring? [was Re: Automatic homepage for sourceforge, googlecode, etc.]

Joshua Root jmr at macports.org
Sat Aug 22 13:46:50 PDT 2009


On 2009-8-23 06:35, Jordan K. Hubbard wrote:
> I hate to get all OOPish on everyone here, but this seems like one of
> those problem spaces that would be well-served by something more closely
> approximating an class model with inheritance and mix-ins than the
> current matrix of options and control flags we have today.  I'm also not
> suggesting that this should happen all at once, causing upheaval and
> discord in the project, but rather constitute more of a "recommended
> direction" for future knob setting mechanisms.
> 
> To be more specific, rather than continue the proliferation of PortGroup
> foo and use_blah extensions, all of which basically cause "magic to
> happen" for the majority of Ports programmers rather than falling into
> some more coherent mental model for them, we could simply start fleshing
> out a class hierarchy for Ports and rolling the port-agnostic behavior
> into one or more classes, with a clearly defined mechanism for a Port to
> inherit from one or more classes or even other ports (that would
> certainly make the -devel ports a lot more concise).   I can think of
> several ways in which this could work, and an equal number of ways that
> this could look, but before I start tossing out Tcl procedure names and
> hypothetical Portfiles, I thought I'd first ask whether or not anyone
> even likes the idea or merely thinks I'm trying to turn a mountain of
> Tcl code into C++ (ye gods, no!).
> 
> Thoughts?

Sounds nice. Add it to the MacPorts 2.0 milestone! ;-)

- Josh


More information about the macports-dev mailing list