MathGroup Archive 2010

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

Search the Archive

Re: More /.{I->-1} craziness

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106186] Re: More /.{I->-1} craziness
  • From: Fred Klingener <gigabitbucket at BrockEng.com>
  • Date: Mon, 4 Jan 2010 06:00:41 -0500 (EST)
  • References: <200912300915.EAA17299@smc.vnet.net> <hhhmn8$o9t$1@smc.vnet.net>

On Jan 3, 3:37 am, DrMajorBob <btre... at austin.rr.com> wrote:
> I think the way we enter and understand InputForm is syntax; FullForm is 
> the way they're stored internally.
>
> So Mathematica's pattern matching isn't what I'd call syntactical...  
> unless you mean "syntactical on a hidden (though discoverable) level".
>
> Bobby
...

I studied the doc center entries for a few things like Replace,
ReplaceAll, etc. as well as tutorial/ApplyingTransformationRules, and
I was unable to find a single entry that might give what we're calling
an "unsophisticated user" a hint that the lhs to be acted on is
anything other than that displayed on the notebook screen.

I wouldn't describe myself as "unsophisticated," but my expectations
are conditioned and contaminated by almost 50 years of technical
computing. As a result, I've been a slow learner of the grand
structure of Mathematica, and I've spent my share of time astonished
by the way Mathematica works and confused by the lack of rewards to be
gained by RTFM.

A mention in the docs of replacement happening on Bobby's "syntactical
on a hidden (though discoverable) level" would be sufficiently
frightening to drive some users back to the hand calculator, but
further mention that that hidden level can be discovered even by an
"unsophisticated user" as the output of //FullForm would be like
sharing the secret handshake.

First line in tutorial/Applying TransformationRules:

expr/.lhs->rhs	apply a transformation rule to FullForm[expr]

unless you don't want to share the secret handshake.

Cheers,
Fred




  • Prev by Date: Re: Re: algebraic numbers
  • Next by Date: Re: NDSolve problem with switching equations
  • Previous by thread: Re: More /.{I->-1} craziness
  • Next by thread: Re: Re: More /.{I->-1} craziness