Re: Literate Programming (Was: Comments are KILLING me)
- To: mathgroup at smc.vnet.net
- Subject: [mg37795] Re: [mg37768] Literate Programming (Was: Comments are KILLING me)
- From: Selwyn Hollis <selwynh at earthlink.net>
- Date: Wed, 13 Nov 2002 01:11:15 -0500 (EST)
- References: <aqfp6g$7d3$1@smc.vnet.net> <200211101038.FAA11813@smc.vnet.net> <aqo078$fpe$1@smc.vnet.net> <200211120813.DAA29053@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Nafod40 wrote: > Selwyn Hollis ... > >>Just a remark: >> >>Writing package code with a simple text editor can give you more >>control, fewer headaches, and cleaner code faster. > > > Ahhh, but that would completely remove my main purpose for using > Mathematica. If I was to just write standard source code, I would do > it in something far less quirky and much more in the mainstream than > Mathematica. > > I'm trying to follow the Literate Programming paradigm, whereby the > you intersperse code with your documentation, not the other way > around. You missed the point completely. You can write Mathematica code in a text editor, and you can make it as "literate" as you like! The reason you're having problems with comments is due to the fact that Mathematica demands that package code be in InputForm (i.e., plain text), plus the quirkiness of how Mathematica converts StandardForm to InputForm. So the simplest way to have your code turn out pretty is to write it in InputForm to begin with, and for that you may as well use a text editor. Just give the file a .m extension and it will work like a charm. --- Selwyn Hollis
- References:
- Re: Comments are KILLING me
- From: "Allan Hayes" <hay@haystack.demon.co.uk>
- Literate Programming (Was: Comments are KILLING me)
- From: may106@psu.edu (Nafod40)
- Re: Comments are KILLING me