Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

d-design-patterns Build Status

A collection of D design patterns/idioms (inspired by python-patterns)

Usage

Working D compiler is required, check out download page on dlang.org.

You can run examples with rdmd tool, dub or build them manually.

Run with rdmd

$ rdmd example.d

Run with dub

dub is a build tool and package manager for the D programming language. Every example in this repository is a single-file dub package.

$ dub example.d

Build manually

Use one of:

$ dmd example.d # for DMD compiler
$ gdc example.d # for GDC
$ ldc2 example.d # for LDC

This will compile and link example program:

$ ./example

List of patterns:

Behavioral patterns

Pattern Description
Command bundle a command and arguments to call later
Strategy selectable operations over the same data

Behavioral patterns (Idiomatic)

Pattern Description
Strategy selectable operations over the same data

Structural patterns

Pattern Description
Decorator wrap functionality with other functionality in order to affect outputs
Facade use one class as an API to a number of others

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.