13
$\begingroup$

When producing or enhancing code, it is tempting to use recent new primitives of Mathematica introduced in version 7 and 8, but for library code or in preparation or future version change in production code, it is better to be compatible with slightly older versions while maintaining only one version of the code.

To do this, I have sometimes written washed-down versions of list manipulation or other primitives of Mathematica 6, 7 and 8 that can run on Mathematica 3, 4 or 5 in a separate .m file that I include in the dependencies of my personal packages. Of course they are most of the times less efficient and less general than the original ones but often sufficient to have the code running.

Have others have done the same thing and if so, are there already published resources on this?

(Note: we could probably merge these efforts (and test cases, etc.) to have a more or less standard "backward compatibility" code. This could also help people maintaining code on hardware which cannot be updated and would be fun as problem solving !)

$\endgroup$
5
  • $\begingroup$ I think this is an interesting idea, yet sadly I don't think it is a good fit for a StackExchange question: it is too open-ended. I shall refrain from closing this myself but do not be surprised if others close it. You can always raise the question in chat and see what comes of it. $\endgroup$
    – Mr.Wizard
    Commented Jun 11, 2012 at 7:16
  • $\begingroup$ @Mr.Wizard : I have slightly edited my question so that it is probably more acceptable as SE question. $\endgroup$
    – ogerard
    Commented Jun 11, 2012 at 7:23
  • $\begingroup$ As it is phrased now, I'd say this question is acceptable. As to the question: One of the problems with version updates is that it can be difficult to find out in which versions changes have occurred. The documentation only records the version number where the function was introduced and the one where it was last changed. If you don't happen to have older versions, finding out what to do is pretty difficult. One necessary step would be to locate a list of changes by version. $\endgroup$ Commented Jun 11, 2012 at 8:56
  • 1
    $\begingroup$ Some Wikipedia text follows ... just for thinking about how the software world have changed over a few years: The zSeries line succeeded the System/390 line (S/390 for short), maintaining full backward compatibility. In effect, zSeries machines are the direct, lineal descendants of System/360, announced in 1964, and the System/370 from 1970s. Applications written for these systems can still run, unmodified, with only few exceptions, on the newest System z over four decades later. $\endgroup$ Commented Jun 11, 2012 at 12:29
  • $\begingroup$ @ogerard I would be very interested in this code for possible use in an open-source variant called Mathics - mathics.org. We don't don't have the ability to read notebooks. Would it be possible to get this code as straight Wolfram Language code? $\endgroup$
    – rocky
    Commented Aug 4, 2021 at 2:44

2 Answers 2

8
$\begingroup$

I'm answering mainly to show solidarity with the idea, although my own efforts at finding a systematic upgrade path with graceful degradation to older versions have ultimately been overtaken by the amount of new and different functionality introduced starting with version 6.

Particularly version 6 was a real nuisance because it was so different from both: the versions before it and the versions after it. I wrote down some notes to help me upgrade my existing notebooks and make the new ones more compatible, on my web site.

An important resource that should be kept handy when thinking about making your packages and notebooks compatible is "Incompatible Changes since Mathematica Version 1".

It's true that for older hardware one may need to keep older Mathematica versions, but it's also true that older versions of Mathematica simply no longer work properly on newer operating system versions. Mathematica 5, for example, doesn't let you move its windows around under OS X 10.7 (as I mention on my web page linked above).

And with version 5, Wolfram support basically will say: so what, the software is much too old for us to still help you keep it running (I'm paraphrasing the response I got about that issue - it's been a while).

$\endgroup$
2
  • 1
    $\begingroup$ +1 The links are very nice! But it is daunting (not that one doesnt know ... but) reading things like 259 new built-in objects have been added, some of whose names may conflict with names already being used. $\endgroup$ Commented Jun 11, 2012 at 22:17
  • $\begingroup$ @jens basically the same thing I asked of the origin poster: I would be very interested in this code for possible use in an open-source variant called Mathics - mathics.org. We don't don't have the ability to read notebooks. Would it be possible to get this code as straight Wolfram Language code? $\endgroup$
    – rocky
    Commented Aug 4, 2021 at 2:47
4
$\begingroup$

The documentation on incompatible ccareful days, "careful design from the outset has allowed nearly total compatibility to be maintained between all versions. As a result, almost any program written, say, for Mathematica Version 1 in 1988 should be able to run without change in Mathematica Version 7—though it will often run considerably faster." Do you think WRI has statistics to back that up?

$\endgroup$
1
  • 9
    $\begingroup$ I'm sure they do, but those statistics can only be displayed using Version5`Graphics`... $\endgroup$
    – Jens
    Commented Jun 11, 2012 at 23:01

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.