MathGroup Archive 2002

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

Search the Archive

Re: Comments are KILLING me

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37742] Re: Comments are KILLING me
  • From: Tom Burton <tburton at brahea.com>
  • Date: Mon, 11 Nov 2002 05:09:56 -0500 (EST)
  • References: <aqfp6g$7d3$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 11/7/02 11:30 PM, in article aqfp6g$7d3$1 at smc.vnet.net, "Nafod40"
<may106 at psu.edu> wrote:

> I can write a simple package with a single line of code written in
> StandardForm, so the 1/10 term is written 1 on top of 10...
> 
> test := Module[(x = 1/10, (* now is the time *) y = 2}, x]
> 
> Using StandardForm and 2D mathematical typesetting, it works fine in
> the notebook. Save it as a package and load it in, and I get a slew of
> error messages...
> 
> \!\(InputForm\`Syntax::"sntxb" :
>   "Expression cannot begin with etc....
> 
> This is KILLING me!

Same goes for highlighting changes with color, font changes, etc. A serious
nuisance! Problems may lie dormant until you port to another platform. A
related issue is that when you process the code through the kernel (e.g.,
menu Cell, Convert To, StandardForm), this local formatting is stripped
away. This loss cannot be undone.

Wolfram Support has discouraged me from using all such "fragile"
constructions. Comments are the least of it really, because alternatives are
better for other reasons: (1) Divide code into small chunks interspersed
with explanatory material. (2) Use longer, self-descriptive names for
symbols.

The related issue above suggests a cure: Process the code through the
kernel, stripping out all local formatting, on the way to the m-file. This
change would "kill" folks who still look at m files. Still, if the
correction were that easy, WRI would have done by now :-) Perhaps the
instability is in the notebook. That would present a more difficult problem.
 
Tom Burton


  • Prev by Date: RE: help with simple data transform
  • Next by Date: Re: help with simple data transform
  • Previous by thread: Re: Literate Programming (Was: Comments are KILLING me)
  • Next by thread: Misbehaving Sum[..,{n,0,Infinity}]