Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: books on writing packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56728] Re: books on writing packages
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Thu, 5 May 2005 06:01:12 -0400 (EDT)
  • References: <d4v6iu$nsm$1@smc.vnet.net> <d57gkh$p6e$1@smc.vnet.net> <d59k7j$6as$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

nafod40 wrote:
> David Bailey wrote:
> 
>>marlinswin at gmail.com wrote:
>>
>>
>>>I'd like to learn to write my own packages for both research and
>>>teaching purposes. Is there any good books or references on package
>>>authoring?
>>
>>Hi,
>>
>>David Park probably said it all, but I would just like to emphasise that 
>>packages are really only a symbol hiding mechanism. Everything that you 
>>can write inside a package can be written without one. The advantages of 
>>using one or more packages only really kick in when you have a fair 
>>amount of code and several people are working on it. Furthermore, most 
>>people start by creating Mathematica code outside a package and package 
>>it afterwards. By the time you have written enough working code to need 
>>a package, it will probably seem fairly simple to create!
> 
> 
> One word of caution is to be careful in using the full glorious power of 
> Mathematica's text formatting in creating notebooks that will become 
> packages. The 'autopackage' conversion is still incredibly buggy, and 
> using such things as colored fonts and italics in your code will cause 
> the package to fail in random unrepeatable ways. You'll spend days 
> chasing odd bugs. Hair will be pulled. You'll find that simply inserting 
> a carriage return or even a single whitespace will magically fix the 
> bug...for a moment. Arggh.
> 
> Same thing for something as simple as using (* comments *). Make your 
> base notebook as plain vanilla as possible.
> 
Yes - that is frustrating - I remember once trying to isolate an example 
of those problems and send it to WRI. The file was still quite large, 
and I'm not sure they ever took on board the issue!

For some strange reason, saving a notebook twice in succession seems to 
eliminate a lot of those glitches!

Does anyone have a nice short example of an autopackage error - it would 
be great to get them to sort that out. Maybe if we all sent in the same 
bug at once!

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: letrec/named let
  • Next by Date: Re: Cases and Nonatomic expression
  • Previous by thread: Re: Re: books on writing packages
  • Next by thread: Re: books on writing packages