Will Version 9 functions all work in Version 10?

Multiple versions of Mathematica can co-exist on a computer without problems. The best approach is to have both version 10 and version 9 installed simultaneously until you are confident that all your critical code work with 10.

When using multiple versions it is useful to go to Preferences -> System and check "Create and maintain version specific front end preferences".

It is also good practice to check the kernel init.m after upgrading, if you have ever changed it, especially if you put anything like this there and forgot about it.


That said, Mathematica generally aims for good backwards compatibility. Since version 6 there haven't been any major breaking changes. The most likely source of conflict is the introduction of new names. For example, many people defined Norm before version 5 introduced a builtin of the same name. This is why it is good practice never to use names starting with capital letters: this guarantees that newly introduced names in future versions won't break older code. (This guideline doesn't apply to packages, which should put everything in a separate context to avoid name conflicts. In fact it's better to use capitalized names in packages for the same reason: avoid conflict with notebook code that doesn't have its own namespace.)


The documentation has some information about which functions have changed and how. The version when the function was last changed is shown at the bottom:

Changes in the last version can be highlighted:

This information should not be considered 100% accurate. There may be accidental omissions. Some changes may not be noted. (Though these are less likely to be breaking changes.)


The default plotting styles have changed in Mathematica 10. If you have notebooks for generating publication figures, they will not produce the same output any more.

It is not only the colours and thicknesses that have changed, but e.g. ListPlot now produces dots with a relative size specification, so they scale with the figure (before it was absolute and the dots didn't scale). This has affected me personally, but the fix was easy.

It should be possible to revert to the old styles by using the option PlotTheme -> "Classic" in plotting functions, or using the global setting

$PlotTheme = "Classic"

I do not know if this setting reverts all styles fully or not.

Updates:

  • PlotTheme -> None may be a better choice than "Classic", e.g. here. This won't reset the font (which will be controlled by the default sans-serif stylesheet).

  • For 3D graphics, "ClassicLights" needs to be used, e.g. PlotTheme -> {"Classic", "ClassicLights"}. (Thanks to kguler.)


As Bezewy notes, some functions, in particular date handling functions, have different return types. DateDifference returns a Quantity object, i.e. the units (days) are included. This can be converted back using QuantityMagnitude.

DatePlus, DateRange, etc. will return DateObject instead of a date list only if the input is also a DateObject. So this shouldn't break old code.

DateObject can be converted back to the old form (a date list) using Normal.

Normal[Today]
(* {2014, 7, 12, 0, 0, 0.} *)

Using Normal for this conversion is more convenient than using DateList because it will convert every DateObject in the expression. For example, we can do Normal@DateRange[Today, DatePlus[Today, 10]].


Some functions have new return types in MM10. For instance, I'm running into trouble with date functions (like DatePlus) since they return DateObjects in MM10 but returned date lists in MM9. Other functions (like DateDifference) now return Quantity objects instead of a number.


One difference I just run into is Dispatch. To get the original rules, use First@Dispatch[•••] in v9, but Normal@Dispatch[•••] in v10.