Difference between revisions of "Tutorials"
(→Common Idioms: another specific section link) |
(→Common Idioms: another common idiom) |
||
Line 13: | Line 13: | ||
* [[Unittest#Placement|Unittest placement]] | * [[Unittest#Placement|Unittest placement]] | ||
** [[Unittest#Unittest-specific imports and helper functions|Imports and helper functions only present when compiling with -unittest]] | ** [[Unittest#Unittest-specific imports and helper functions|Imports and helper functions only present when compiling with -unittest]] | ||
+ | * [[Commenting out code]] | ||
* [[Voldemort types]] | * [[Voldemort types]] | ||
Revision as of 22:36, 14 December 2012
Best Practices
- Order of import statements
- Portability and performance
- Conventional module name for importing all modules in a package
Common Idioms
Although D inherited much of its syntax from C and C++, the new features that it introduces lead to some common idioms that are unique to D.
- Initializing variables
- Declaring constants
- Looping over integers
- Unittest placement
- Commenting out code
- Voldemort types