MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Best practice for Mathematica package development

* What's the best way to convert old AutoGeneratedPackage notebooks
into packages in either Workbench or the new package (.m) editor built
into Mathematica 6? Notebook code contains many niceties, like
intelligent spacing of function arguments and automatic indenting,
which are lost when converting to either Workbench or Mathematica 6
package editor documents.

Related question:

* f[x,y] or f[x, y]? Why? The former looks better (when pasted) in
notebooks; the latter looks better in plain text files. Similar
questions hold for indentation etc.

On Jun 6, 8:49 pm, Andrew Moylan <andrew.j.moy... at> wrote:
> To elaborate a little more, some of the other particular topics (aside
> from those mentioned in my original post) for which I am interested in
> best practises are:
> * layout of .m files in package directories, and why;
> * testing (use Eclipse's built-in testing stuff? a separate
> Mathematica notebook? why?);
> * uniqueness of exported symbol names (i.e., has this old question
> been resolved satisfactorily yet:
> * long function definitions with (*comments*) inside them versus many
> smaller function definitions with (*comments*) between them; and
> * standards for features new to Mathematica 6, like syntax colouring.
> On Jun 5, 8:34 pm, Andrew Moylan <andrew.j.moy... at> wrote:
> > What are the best standards and practices to follow when developing
> > serious Mathematica packages that are intended for many people to use?
> > Is there a handy guide, and/or template .m files, that can be used by
> > prospective package developers?
> > In the past I have made packages by allowing Mathematica to
> > automatically generate .m files from a notebook containing the
> > relevant definitions in initialization cells. With the advent of
> > Workbench, I assume this is no longer the best method.
> > I am interested in best practices related to managing options,
> > contexts, warnings and errors, interfaces in general, etc. Is there a
> > list of standards adhered to when WRI designs packages?
> > Of course I can often see how others have designed packages by reading
> > the .m files in their packages. Are all well-known packages as well-
> > designed as each another? Can anyone recommend a particular package as
> > a good example of how to write packages well?

  • Prev by Date: Re: Best practice for Mathematica package development
  • Next by Date: Re: Antialiasing of 3D graphics
  • Previous by thread: Re: Best practice for Mathematica package development
  • Next by thread: Hold and Simplify