MathGroup Archive 2010

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

Search the Archive

Re: What does & mean?

  • To: mathgroup at
  • Subject: [mg107181] Re: What does & mean?
  • From: AES <siegman at>
  • Date: Fri, 5 Feb 2010 03:19:58 -0500 (EST)
  • Organization: Stanford University
  • References: <hkeas3$t2p$>

In article <hkeas3$t2p$1 at>,
 Bill Rowe <readnews at> wrote:

> >A conventional method would be to declare a traditional static
> >called function:
> >g[x_] := x*Sin[x]
> I could just as easily define g by
> g = # Sin[#]&

This example, IF correct and fully generalizable, is terse, helpful, and 
instructive -- much easier than trying to read and understand the 
separate definitions of # and &.

But does the second form remind anyone of the old characterization of 
APL as a "write once, read never" language.

Suppose one sends a copy of a notebook that describes, solves and 
displays typical results for some significant technical problem (in 
David Park mode) to a non-Mathematica-using colleague, or gives it to a 
similar student.  

If the Input cells throughout this notebook are generally coded in the 
first form above, non-Mathematica-skilled recipients will very likely be 
able to understand (or easily deduce) the starting equations; grasp the 
algorithms employed in the analysis; and even reproduce (or modify) the 
analysis or the results using whatever tools they may favor.

If the notebook is generally coded in the second form (and its contents 
are of any complexity), this won't be the case.

Something to keep in mind . .  .

  • Prev by Date: Re: Bug? Analytical integration of cosines gets the sign wrong
  • Next by Date: Re: Diagonalizing large matrices
  • Previous by thread: Re: Re: Re: What does & mean?
  • Next by thread: how to make lines wider in legend