MathGroup Archive 2007

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

Search the Archive

Re: Best practice for Mathematica package development

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77415] Re: Best practice for Mathematica package development
  • From: Andrew Moylan <andrew.j.moylan at gmail.com>
  • Date: Fri, 8 Jun 2007 05:29:38 -0400 (EDT)
  • References: <f43e7d$mv$1@smc.vnet.net><200706061044.GAA23649@smc.vnet.net>

Hi Chris,

That seems to be the recommended file layout. But why not just have a
single file, PackageName.m, and put it directly in the $Path?


On Jun 7, 5:47 pm, "Chris Chiasson" <c... at chiasson.name> wrote:
> On 6/6/07, Andrew Moylan <andrew.j.moy... at gmail.com> 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;
>
> based on the way that the Get command works, the layout I use is:
>
> <some directory on $Path>\PackageName\PackageName.m
> <some directory on $Path>\PackageName\Kernel\Init.m
>
> contents of Init.m:
> <<PackageName`PackageName`
>
> command to load package is then:
> <<PackageName`
>
> there might be a less verbose way to do this (in terms of file layout)
>
>
>
> > * testing (use Eclipse's built-in testing stuff? a separate
> > Mathematica notebook? why?);
>
> I don't have much experience with the test functions
>
>
>
> > * long function definitions with (*comments*) inside them versus many
> > smaller function definitions with (*comments*) between them; and
>
> IMO, it's usually better to go with many small functions whose
> (multiple) DownValues control the flow of the "program".
>
> --http://chris.chiasson.name/




  • Prev by Date: Re: Re: Java failure
  • Next by Date: Re: Re: 2D pattern matching
  • Previous by thread: Re: Re: Best practice for Mathematica package development
  • Next by thread: Re: Re: Best practice for Mathematica package development