Section 718.3 specifies where there is discretion; then you have, peppered throughout the Criminal Code in other spots, situations in which it's mandatory. Where it's mandatory, however, it's done sparingly and done typically for the very serious, high-level types of offences—terrorism, as an example, and some firearms offences. Otherwise the idea is to leave the discretion to the sentencing court to determine what's appropriate in all of the circumstances.
On October 4th, 2017. See this statement in context.