81
$\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$
  • $\begingroup$ Somewhat related; my attempt to list fixable bugs by version: (30599) $\endgroup$ – Mr.Wizard Jun 19 '15 at 21:42
74
$\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


Between Versions 11.2 and 11.3


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.


Between Versions 10.4 and 11


Between Versions 10 and 10.1

  • 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$
  • 15
    $\begingroup$ Klingon character support has been removed: that's because Klingons do not respect the Galactic Copyright Treaty $\endgroup$ – magma Aug 6 '14 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 Aug 6 '14 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 Aug 6 '14 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$ – Simon Woods Aug 12 '14 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 Aug 20 '14 at 0:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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