Difference between revisions of "Tutorials"
(→How To: +wl) |
(→Common Idioms: dense multidimensional dynamic arrays) |
||
Line 14: | Line 14: | ||
** [[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]] | * [[Commenting out code]] | ||
+ | * [[Dense multidimensional arrays|Declaring dense multidimensional arrays]] | ||
* [[Voldemort types]] | * [[Voldemort types]] | ||
Revision as of 17:43, 5 February 2013
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
- Declaring dense multidimensional arrays
- Voldemort types
How To
- Compile and link with DMD on Windows
- Function literals
- printf
- Regular expressions
- Runtime type information (RTTI)
- Implicitly convert a user-defined type to a builtin type
- Convert header files with SED
- Output locale character (MBS) to console
- Run D in a CGI (web) environment
- Promote D Projects
- Tame OPTLINK
- Run unit tests
- Define custom print format specifiers