Style/Structuring question: One vs. multiple global objects
hhasemann at web.de
Mon Jul 2 13:22:58 PDT 2007
Deewiant <deewiant.doesnotlike.spam at gmail.com> wrote:
> Henning Hasemann wrote:
> > Well the dependency-inversion thingy I found
> > (http://www.objectmentor.com/resources/articles/dip.pdf) was really
> > enlightning, maybe it helps you too. The basic idea is to misuse
> > interfaces to simulate some of the benefits of C++'s header files.
> It incurs runtime penalties and makes the code too cluttered, IMHO.
How big are those penalties? What are the extra steps your machine has
to do when you compare acces through an interface with direct access to
> One thing I came up with was doing the "tile_and_entity.d" like so:
> module tile_and_entity;
> Should work, but quite hacky.
Looks like a good idea for such situations with two modules that need
each other, but if I understand correctly that wouldnt be able to
handle all the things that DIP can, or?
GPG Public Key:
Fingerprint: 344F 4072 F038 BB9E B35D E6AB DDD6 D36D 4191 1851
More information about the Digitalmars-d-learn