MathGroup Archive 1999

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

Search the Archive

AWOL message?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg16634] AWOL message?
  • From: Tom Burton <tburton at brahea.com>
  • Date: Fri, 19 Mar 1999 12:53:54 -0500
  • Sender: owner-wri-mathgroup at wolfram.com

--------------------------------

On 16 Mar 1999 06:20:43 -0500, Jack Goldberg
<jackgold at math.lsa.umich.edu> wrote:

>...My main purpose in using Mathematica is help students learn mathematics.
>So for my purposes the fact that Mathematica evaluates everything in sight
>is a major drawback...
>
>What say yo'all?

Having arrived at Mathematica from Fortran and C, I expect full
evaluation. Most of my functions are designed to produce atomic output
and need full evaluation. I suspect that, on balance, single-step
evaluation would bug me.

In the explanatory material that complements these functions, I want
more control over evaluation.  There I create many more rules (a->b)
than definitions (a=b). A rule applied with ReplaceAll (expr /. rule) is
essentially a single-step evaluation, isn't it? (Provided, of course,
that the result of the evaluation does not include a defined
expression).

I agree with Jack Goldberg that restraining the evaluation of defined
symbols with Hold* or Unevaluated can be clumsy and occasionally
overwhelming--I see myself trying to hold back a tide of evaluation with
a spoon. The two examples he supplied suggest a common strategy:
 (1) Wrap the entire expression in HoldForm
 (2) Create rules a->b to transform the expression as desired. *
 (3) Reach into the held expression with ReplaceAll to apply the rules.
(See sections 2.3 and 2.4 of The Mathematica Book.)

* In place of a or b, you might need HoldPattern[a] or Holdform[b].
Clumsy.

Mathematica follows a small number of simple conventions governing
evaluation. They don't fit my needs all the time, but at least I can
remember what they are and deal with them.  In another part of this
thread, Dave Withoff comments that,

"Even in systems like Lisp or Macsyma, which are nominally
designed around single-step evaluation, most such evaluations happen
automatically."

Most? Such? Ugh. More conventions to remember. Spare me!
Thomas E. Burton              353 Sanford Road
Brahea, Inc.                  Encinitas CA 92024-1508
tburton at brahea.com            760/436-7436


  • Prev by Date: Module Syntax Error
  • Next by Date: Re: mathematica:- question ?
  • Previous by thread: Module Syntax Error
  • Next by thread: Improving PolynomialQ