Re: What does & mean?
- To: mathgroup at smc.vnet.net
- Subject: [mg107181] Re: What does & mean?
- From: AES <siegman at stanford.edu>
- Date: Fri, 5 Feb 2010 03:19:58 -0500 (EST)
- Organization: Stanford University
- References: <email@example.com>
In article <hkeas3$t2p$1 at smc.vnet.net>, Bill Rowe <readnews at sbcglobal.net> 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 . . .