On Monday, 13 August 2018 at 14:16:47 UTC, Mike Parker wrote:
On Monday, 13 August 2018 at 13:09:24 UTC, Andrey wrote:
On Monday, 13 August 2018 at 13:05:28 UTC, evilrat wrote:
however the best option is simply avoid naming anything with same name as module.

Hmm, I thought that name of class should match name of file...

And how to name a file that contains only one class/struct? Like in my case. What usually true D coders do?)

The convention is to use lowercase for the module name:

module myclass;

struct MyClass {}

Using lowercase letters for module names (and their respective file names!!) also prevents weird errors when different OSes treat lower/capital case letters differently which can sometimes lead to modules not being found.

So from my experience: always use lower-case letters for modules and the file names.

Reply via email to