Stupid global variable syntax question...
WhatMe Worry
kheaser at gmail.com
Sun Dec 29 03:45:03 UTC 2019
Is it considered poor programming practice to have two modules
import each other?
I've got lots of global variables (i know bad programming) in the
module with main()
module app;
import game;
// __gshared stores the variable in the classic global data
segment.
__gshared enum bool particulate = true;
module game;
import app; // needed or else get undefined identifier
particulate
if (particulate)
{
...
Is there a better way to structure this?
More information about the Digitalmars-d-learn
mailing list