Are modules analogous to namespaces in C# or packages in Java?

2014-01-01 Thread Afshin
Modules confuse me as a way to organize code. If a module is composed of multiple classes, it seems that the module semantics in D encourages putting all those classes in one file. Can someone explain how to organize a set of classes into a module (or namespace, or package) so that each clas

How to organize using modules?

2013-12-30 Thread Afshin
Is it possible to describe modules in terms of packages (as found in Java)? The features that Java packages have that I can't seem to get in D are: 1) You can have classes that are in the same package, but kept in separate files. 2) You can import many classes using the '*' syntax. Is this p

Re: Possible bug - should the following code cause an access violation exception?

2013-12-30 Thread Afshin
Thanks Ali. I uninstalled 2.63.x. Installed the 2.64.2. I compiled and ran the test, and surely enough there were no problems. However, when I build using Visual D environment, the problem persists. Microsoft Visual Studio 2010 Ultimate. Visual D plugin. Thankfully, there is a simple work

Possible bug - should the following code cause an access violation exception?

2013-12-29 Thread Afshin
module test; class Foo { public static ulong next = 0; public static ulong getNext() { return next++; } } void main() { Foo.getNext(); } /* The next++ is the culprit. Using a ++next does not throw an exception. */