17
$\begingroup$

Is there any good documentation on which version will work (remained the same) in which version of Mathematica? Or at least an overview of when functions were introduced?

In this instance for example I would like to know who could be the culprit for some code not working on version 9 when it is functional in v11.

I expect that one of the following is new/altered since version 9:

Select, FileNames, StringContainsQ, Or, StringJoin, ToString.

$\endgroup$
  • 2
    $\begingroup$ At the bottom of the documentation page for each function in the help system there is an indication of when a function has been introduced, and when it was last modified, with version numbers. Would that help? $\endgroup$ – MarcoB Jun 10 '18 at 18:19
  • 1
    $\begingroup$ Related: mathematica.stackexchange.com/q/56728/4999 $\endgroup$ – Michael E2 Jun 10 '18 at 18:37
  • 1
    $\begingroup$ I once wrote a MMA script that creates a dataset with all possible incompatibilities of a given Wolfram Script (.wl or .m file): gist.github.com/JEM-Mosig/b58aa55e2da5ffcd5e29e6ac93c5ed5a $\endgroup$ – JEM_Mosig Jun 10 '18 at 23:29
31
$\begingroup$
data = WolframLanguageData[{"Select", "FileNames", "StringContainsQ", 
    "Or", "StringJoin", "ToString"}, {"Name", "DateIntroduced", 
    "DateLastModified", "VersionIntroduced", "VersionLastModified"}];

TableForm[data, 
 TableHeadings -> {None, {"Name", "DateIntroduced", 
    "DateLastModified", "VersionIntroduced", "VersionLastModified"}}]

enter image description here

So StringContainsQ is nonexistent in v9, hence it's the culprit.

$\endgroup$
  • 2
    $\begingroup$ +1 This is beautiful... $\endgroup$ – Mehrdad Jun 10 '18 at 20:18
7
$\begingroup$

WolframLanguageData has the answers you are looking for - specifically, versions in which symbols were introduced or modified!

symbols = 
 EntityValue[
  "WolframLanguageSymbol", {"Name", "FullVersionsModified", "VersionIntroduced"}]

This gives a list of the name of each symbol, the version numbers within which they were modified, and the versions in which they were introduced. For instance,

{"Capitalize", {"11.", "11.2"}, 10.1}

This shows that Capitalize was introduced in 10.1, and modified in 11 and 11.2.

Now you can Select subsets of these symbols, for instance by the version in which they were introduced:

Select[symbols, Last@# > 10 &]

This gives all symbols introduced after version 10.

Have a look at the documentation - there are many other properties for WolframLanguageData, hopefully it'll help!

$\endgroup$
5
$\begingroup$

See http://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn11.html and the related pages on the bottom. This will tell you that StringContainsQ has been altered going from 10 to 11. This is probably the cause of the problem. These pages seem to be the best sources on the changes (although they are not very good).


(If someone knows a more comprehensive source that would be great, note some peculiarities of this source: The page on changes from 10.4 to 11.0 does not contain StringContainsQ while the one on new/altered functions in 11 does. Is there a reason for this?)

$\endgroup$

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.