Portability and Performance

On code created today for 32-bit CPUs that may need to be used on 64-bit or larger CPUs in the future.

per Walter from the D forum ( NG:digitalmars.D/5792):
For a loop index, you should use 'size_t'. This is because the offset to a pointer will increase in size on 64 bit machines. size_t is defined in object.d.
--MarkT

The D spec defines int as a signed 32 bit integer. As of DMD 0.77, size_t is "an alias for an unsigned integral type spanning the address space" -- AndyFriesen

Conventional Module Name for Importing All Modules in a Package

In Java, if you want to import all of the modules in a package, you'd do this:

import javax.swing.*;

Since D doesn't have a "*" (and it's unlikely that D would get such a shortcut), this capability could be added to a class by adding a module, that imports the other modules. So what should such a module be called. There have been a few suggestions.

Windows, Win64, Win32 and linux are predefined. See version.html for more ( D 1.x, D 2.x).

Some of you should remember C++ and the hassles that it sometimes requires when the code is written assuming this and that. I've seen libraries that need to compile with some switches but others require different and then it all goes down hill from there. It also makes it harder for automated tools like DSSS.

Exceptions

When creating your own Exception provide the these two default constructor signatures. This will allow the file and line of the throwing function to be forwarded by those creating a new instance of the Exception: