This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.traits; | |
import std.getopt; | |
// Specify The Parameter Structure | |
struct Options | |
{ | |
@Option("threads", "t") | |
@Help("Number of threads to use.") | |
size_t threads; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio, std.traits; | |
struct ModelA | |
{ | |
// D only allows single inheritance, must use interfaces | |
interface iAnimal | |
{ | |
string Type(); | |
string Name(); | |
void Attack(iAnimal who); |