83
$\begingroup$

There is documentation of the incompatible changes made to Mathematica with each major release:

Unfortunately that documentation simply stopped with version 7. Therefore I ask:

What incompatible changes have been made since Mathematica 7?

There are other questions on the subject but I wish to make this an exhaustive index for easy reference.

$\endgroup$
3
  • $\begingroup$ Somewhat related; my attempt to list fixable bugs by version: (30599) $\endgroup$
    – Mr.Wizard
    Commented Jun 19, 2015 at 21:42
  • 1
    $\begingroup$ It seems this tutorial has been updated through version 12.1 now. $\endgroup$
    – Greg Hurst
    Commented Mar 19, 2020 at 17:48
  • $\begingroup$ @ChipHurst Thanks! I am glad; this Q&A should not have been needed, as the developers are in a far better position to write such a thing. Nevertheless please let me know if important points here are missing from the official one. $\endgroup$
    – Mr.Wizard
    Commented Mar 19, 2020 at 18:01

1 Answer 1

75
$\begingroup$

Prelude

The items in this post are not generally regressions; they are simply changes and enhancements that may break code or cause problems in moving from one version to another. The work-arounds are offered as specific solutions to instances of incompatibility, not as recommendations of general practice. For example, Plot Themes are a powerful tool one should learn to use; I discourage disabling this tool by setting $PlotTheme = None unless that is needed for a specific result.


Between Versions 11.3 and 12.0

  • Functions in the built-in "MediaTools`" package allowing fast import of AVI files frame-by-frame were renamed and received usage documentation.

  • Total no longer sums over arbitrary heads by default. Use option AllowedHeads -> Inherited for the old behavior, or AllowedHeads -> All to sum over mixed heads. (Reference)

LibraryLink

  • WolframLibraryVersion bumped to 5 (from 4)

Between Versions 11.2 and 11.3

LibraryLink

  • MSparseArray_getExplicitValues() now returns NULL when called with a non-pattern sparse array that has no explicit values stored. Previously, it would return a valid but empty MTensor. It would only return NULL when called on a pattern array.

Between Versions 11.1 and 11.2

  • Rasterize now returns an Image instead of Graphics by default. Use the second argument to specify what format to return.

  • <-> and TwoWayRule introduction

    <-> was parsed as \[UndirectedEdge], now (11.2+) as \[TwoWayRule]. TwoWayRule is interpreted by Graph functions as UndirectedEdge but that does not solve the problem: 158657

  • LinearAlgebra`MatrixConditionNumber is no longer present in 11.2 and several Q&A depend on it; one can use LinearAlgebra`Private`MatrixConditionNumber instead.

LibraryLink

  • WolframLibraryVersion bumped to 4 (from 3)

Between Versions 11.0 and 11.1

  • Image Arithmetic and statistical operations such as Log, Plus and Mean work directly with Image since then e.g. Image[{{1, 2}, {4, 5}}/10] == Image[{{1, 2}, {4, 5}}]/10 now returns True.

Between Versions 10.4 and 11


Between Versions 10 and 10.1

  • In function definitions default value neen not nesessarily match the pattern anymore.

  • FrameTicks no longer recognizes the syntax {bottom, left, top, right}
    Give specifications in the form {{left, right}, {bottom, top}}
    Or redefine an internal function FrameTicksQ: (82675)

  • MovingMap has seen major revision with incompatible syntax changes. (Reference)
    Use the option Method -> "Legacy" within MovingMap to achieve the old behavior

  • Optional behavior has changed in the case of incongruous head patterns. (Reference)

  • ImageAdd and ImageMultiply now by default always assume alpha channel for non-transparent single-channel images to be equal to 1. In previous versions it was taken to be equal to the color channel. (Reference)


Between Versions 9 and 10

  • Join now allows Join[{A[x]}, {A[x]}, 2]: Silent change (bug?) of Join after v9

  • Slot: in V10 #x and #"x" now parse as Slot["x"] and is interpreted as key name x for use with Association. In prior versions these were parsed as multiplication: #1 * x and #1 * "x".
    Add something to act as a separator or use #1 form: # x, #*x, #1x, (#)x

  • Dispatch expressions are now Atomic and cannot be manipulated with Part or patterns.
    Use Normal to convert a Dispatch table into a Rule list.

  • DateDifference now returns a Quantity expression.
    Use DayCount instead or use QuantityMagnitude to strip the units.
    Alternatively, using SetSystemOptions["DataOptions" -> "ReturnQuantities" -> False] will restore the old DateDifference behavior (see Possible Issues section of the DateDifference documentation).

  • DateRange now returns lists with year, month and day regardless of what the increment is.
    The change and possible workarounds are further discussed here.

  • GeoDistance and GeoDirection now return a Quantity expression.
    Use QuantityMagnitude to strip out the units.
    (This solution applies to any function that now returns a Quantity instead of a value.)

  • Klingon character support has been removed. \[KlingonA] etc. are no longer recognized as valid input syntax. Solution unknown.

  • LogPlot and family no longer provide standard log plot gridlines when Automatic is specified.
    A GridLines function based on the internal Ticks generator may be used. (broken in 10.0.0)

  • PlotTheme changes the fundamental style of most plots and overrides BaseStyle and GraphicsBoxOptions settings.
    Use PlotTheme -> None, individually or with SetOptions or $PlotTheme.

  • PlotLegends -> "Expressions" does not generate a legend when used with a single plot function.
    Use PlotLegends -> "AllExpressions" instead.

  • PlotLegends now does not automatically generate more legend items than there are colors in the working color scheme. (Reference)
    Use a color scheme with a sufficient number of colors to differentiate all plot elements, a gradient scheme, or a manual legend specification.

  • ParallelNeeds defaults to the System context when loading packages which introduce symbols outside the package context. In previous versions (and Needs) these symbols are in the Global context. This has been confirmed by Wolfram support as a design decision, not a bug.
    Create global symbols within package files in the Global context explicitly, as in Global`x.

  • NSolve returns the same solution several times to indicate its multiplicity. Before V10 it returned a solution with multiplicity only once. (Reference)
    Use DeleteDuplicates@NSolve[...]

  • Nearest gives message and returns unevaluated when given an empty list as first argument. In Version 9 and before an empty list was returned.
    check for empty lists before calling Nearest or for unevaluated Nearest in result...

  • WeatherData now returns a TemporalData object using TimeSeries and Quantity rather than a plain array.
    Use Normal and QuantityMagnitude to recover the plain form for legacy code.

  • ListPlot and ListLinePlot may use a wider Automatic plot range than expected when working with data that covers a very small range. (Reference)
    Use the undocumented option "AllowMicroRanges" -> True for individual plots or set SetOptions[System`ProtoPlotDump`iListPlot, "AllowMicroRanges" -> True].

  • Blur, ImageConvolve, GaussianFilter now aren't applied to the alpha channel of Image (what is consistent with behavior of ImageAdjust, Dilation etc.). ImageFilter and ImageCorrelate still affect the alpha channel.
    To reproduce the old behavior one should remove the colorspace information.

  • ImageCompose has lost the associative property and produces entirely different results than earlier. The solution is to divide the color channel of the output by its alpha channel.


Between Versions 8 and 9

  • Image expressions are now Atomic; data cannot be extracted using Part.
    Use ImageData and Options to extract raster data and options respectively.
    Use PixelValue or ImageValue to query raster values
    Replacement rules are overloaded to work: Image[{{.1, .3, .9}}] /. _[x__] :> {x}

  • Interpolation of an unstructured grid is in V8 possible for more than 3 dimensions (linear interpolation only). In V9 and higher Interpolation in more than 3 dimensions is not possible. (Reference)
    3rd party realizations of unstructured grid interpolations are available here, here, here, and here ( using different approaches and with different performance).

  • TeXForm no longer works properly with Row expressions, whether by design or oversight. (Reference)
    Set BoxForm`$UseTemplateSlotSequenceForRow = False;

  • Solve can now return ConditionalExpression objects, rather then just one particular branch of the inverse.
    Use Normal to remove the ConditionalExpression head. This however does not remove any GeneratedParameters.
    Revert to version 8 behavior via SystemOptions: SetSystemOptions["ReduceOptions" -> "UseTranscendentalSolve" -> False].

  • General Legend functionality has been overhauled. Many things do not work quite the same and many low-level methods no longer work. (Example)

  • PlotJoined option for ListPlot is no longer accepted. (It was deprecated in 6.0 but continued to work.)
    Use Joined in its place, or ListLinePlot.


Between Versions 7 and 8

  • Hash now gives the hash of a raw sequence of characters when applied to Strings. In past versions the string characters (quotation marks) were included in the calculation of the hash. (Reference)
    Use "\"" <> string <> "\"" before hashing if you want output to match older versions.

  • \[Dash], \[LongDash] and \[Hyphen] may no longer be used as part of Symbol names. (Reference)

  • ImageCrop no longer removes layers of bordering pixels with color values that exactly match the colors of the borders, now it "removes borders from image whose pixel value distribution is almost uniform."
    A workaround is to use ImagePad[img, -BorderDimensions[img, 0]] instead of ImageCrop.



Non-version-specific

  • Hash used without a specified type cannot be expected to return the same value from one version or platform to the next. There appears to be no way to compute the Hash values from older versions apart from actually running that version of Mathematica.
    Specify a hash type if you intend to rely on the stability of these values.
$\endgroup$
44
  • 15
    $\begingroup$ Klingon character support has been removed: that's because Klingons do not respect the Galactic Copyright Treaty $\endgroup$
    – magma
    Commented Aug 6, 2014 at 9:29
  • 4
    $\begingroup$ Writing #x and #"string" in versions < 10 to mean # x and # "string" respectively is bad form anyway (a habit propagated by the Church of the Tersists, no doubt ;)). Such code deserves to be broken :P $\endgroup$
    – rm -rf
    Commented Aug 6, 2014 at 16:18
  • 1
    $\begingroup$ @rm-rf The interactive editor would previously auto-space such things just as it still does when you type 3x. (I don't mean that it enters a literal space but rather shows the expression with spacing.) Do you always type a space between such things? I have not as it seemed like wasted effort. $\endgroup$
    – Mr.Wizard
    Commented Aug 6, 2014 at 16:27
  • 1
    $\begingroup$ @eldo, I think the Inset thing is a bug rather than a deliberate change, so it doesn't belong in this list in my opinion. $\endgroup$ Commented Aug 12, 2014 at 21:08
  • 1
    $\begingroup$ @Szabolcs The original report was filed online, I did not keep a copy. Below is a copy of the reply from support: Thanks for contacting Wolfram Technical Support. Regarding the issue you reported, it seems this is an intentional design change. We have internal discussions on this and the argument from the developer is that "Setting $Context to $System on subkernels is necessary to make sure (new) system symbols arrive in the correct context on subkernels, because despite the MathLinkPrintFullSymbolName settings, system symbols do not have their context attached". $\endgroup$
    – Daniel W
    Commented Aug 20, 2014 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.