  Traditional solvers for delay differential equations (DDEs) are designed
around only a single method and do not effectively use the infrastructure of
their more-developed ordinary differential equation (ODE) counterparts. In this
work we present DelayDiffEq, a Julia package for numerically solving delay
differential equations (DDEs) which leverages the multitude of numerical
algorithms in OrdinaryDiffEq for solving both stiff and non-stiff ODEs, and
manages to solve challenging stiff DDEs. We describe how compiling the ODE
integrator within itself, and accounting for discontinuity propagation, leads
to a design that is effective for DDEs while using all of the ODE internals. We
highlight some difficulties that a numerical DDE solver has to address, and
explain how DelayDiffEq deals with these problems. We show how DelayDiffEq is
able to solve difficult equations, how its stiff DDE solvers give efficiency on
problems with time-scale separation, and how the design allows for generality
and flexibility in usage such as being repurposed for generating solvers for
stochastic delay differential equations.
