Skip to main content

Questions on writing non-trivial programs in Mathematica. Do not use this tag for questions on plotting/graphics or for questions on doing mathematics with Mathematica, where the focus is more on the math than the program.

Questions in this tag are expected to require the implementation of new, general functionality (i.e. new algorithms, constructs, abstractions, data types and data structures, etc.). Questions requiring/asking for good examples of program design, novel use of language constructs usually combined with of a highly abstract level of programming or the philosophical/theoretical aspect of programming in Mathematica belong here (OO-style, linked lists, metaprogramming, etc.). Also, if your question involves an extensive amount of code there is a good chance it belongs to this tag.

Example questions:

Questions about functional programming should use . Questions on linear/nonlinear/mathematical programming (i.e., constrained optimization) should use the tag instead.

Be aware that often it is hard to predict in advance whether or not this tag is appropriate for a given question, because it often only becomes clear once some good / relevant answers to it are posted. A proper thing to do is to review the question and especially answers after the question has been answered satisfactorily, and check if at least some of the good / representative answers contain any of the following:

  • Large (more than, say, 20 lines, and often several functions) amount of Mathematica code, which serves its purpose, in the sense that it can not be easily reduced to fewer lines without missing some of the defining properties of the solution (e.g. efficiency or generality)
  • Implementation of reasonably generic new functionality, which can be used in (many) more situations than the current problem.
  • Implementation of interesting algorithms and / or data structures
  • Good example of program design, where by splitting a problem into right sub-problems and using appropriate tools to "glue" it together, an extensible and modular design is achieved.
  • Interesting new abstractions or instructive use of some known abstractions (e.g. linked lists, OO-style, strong types, etc, etc)
  • Interesting and possibly novel uses of language constructs. In particular, using certain combinations of them to achieve things which are not easy to achieve by other means.

If they do, chances are that this tag is relevant and appropriate.