Re: Probably a trivial question regarding version identifier and unittest
On Tuesday, 12 May 2020 at 02:17:36 UTC, Adam D. Ruppe wrote: On Tuesday, 12 May 2020 at 01:54:49 UTC, WhatMeWorry wrote: [...] The unittest {} block is actually a special syntax for a function. So the main function in here is a *nested* function inside the unittest function and thus doesn't count as a starting point. It is like if you defined [...] This is gold! I've been poking around and reading for days, but you've gotten me further with just a few paragraphs. Cant thank you enough.
Stupid global variable syntax question...
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?