MathGroup Archive 2007

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

Search the Archive

Re: Re: Best practice for Mathematica package development


On 6/6/07, Andrew Moylan <andrew.j.moylan 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: apparently I don't know how to use Map (or Apply or MapThread)
  • Next by Date: simplification
  • Previous by thread: Re: Best practice for Mathematica package development
  • Next by thread: Re: Best practice for Mathematica package development