Interdependent modules?

Jeremy Gibson jtgibsontelusnet
Mon Jun 19 23:29:38 PDT 2006


>Just throwing out an idea here, but if two modules are dependant on each
>other, why not combine them into a single module?

Two reasons, although I'll admit that I hadn't thought of that. ;-)

First and foremost is length: my object class are heavyweight classes which
represent objects existing in 3D; my data classes are lightweight classes for
storing simple information (they'd be justifiable as structs, really).  Second
is specialisation: the data classes are very, very simple and generally
applicable, but the object classes are the root of a whole hierarchy of classes,
and have (rather, will have) a lot of physics and the like that isn't really
relevant to most other modules.

I suppose the easiest way to describe the difference is by saying that objects
are of actual interest to the end user of the program, while the data classes
are only of use to the programmer: I'd prefer to keep those different concepts
distinct to make things a little more manageable on my end.





More information about the Digitalmars-d-learn mailing list