Difference between revisions of "Tutorials"
m (→How To) |
|||
Line 1: | Line 1: | ||
+ | See also category [[:Category:Tutorials|Tutorials]]. | ||
+ | |||
== Videos Tutorials == | == Videos Tutorials == | ||
* [[Videos#Tutorials | Video tutorials]] | * [[Videos#Tutorials | Video tutorials]] | ||
Line 60: | Line 62: | ||
* [[COM Programming]] | * [[COM Programming]] | ||
* [[Using UTF on Windows]] | * [[Using UTF on Windows]] | ||
− | |||
− |
Revision as of 10:21, 14 November 2014
See also category Tutorials.
Contents
Videos Tutorials
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
Design Patterns
- Instantiator Function Pattern - Instantiating classes and structs with minimal redundancy.
- Compile-time Command Pattern - Store function and arguments to be invoked later.
- Higher Order Range Pattern - Transform a range before passing it to a function/object.
- Mixin Macros Pattern - Mixins + Compile-Time Magic
- Low-Lock Singleton Pattern - Singletons without double-checked locking
How To
- Bind D to C
- Compile and link with DMD on Windows
- Link with the Unilink linker on Windows instead of Optlink
- Convert header files with SED
- Define custom print format specifiers
- Function literals
- Implicitly convert a user-defined type to a builtin type
- Output locale character (MBS) to console
- Promote D Projects
- Regular expressions
- Runtime type information (RTTI)
- Run D in a CGI (web) environment
- Tame OPTLINK
- Run unit tests
- Using NASM with D
- Split file into multidimensional dynamic string array
- Porting 32 Bit Code to 64 Bits
- Converting C .h Files to D Modules
- Instantiating Class Objects Elsewhere Than the GC Heap
- Timing Code
- Extending Unit Tests
- Running DMD From The Command Prompt
- Perf
See also category HowTo.