[Date Index]
[Thread Index]
[Author Index]
Re: RE: Re: General--Difficulties in Understanding Mathematica Syntax
*To*: mathgroup at smc.vnet.net
*Subject*: [mg69115] Re: [mg69074] RE: [mg69033] Re: General--Difficulties in Understanding Mathematica Syntax
*From*: Murray Eisenberg <murray at math.umass.edu>
*Date*: Wed, 30 Aug 2006 06:34:02 -0400 (EDT)
*Organization*: Mathematics & Statistics, Univ. of Mass./Amherst
*References*: <200608290726.DAA29071@smc.vnet.net>
*Reply-to*: murray at math.umass.edu
*Sender*: owner-wri-mathgroup at wolfram.com
I would disagree that "the functional programming approach in
Mathematica can result in code that is very difficult to read first time
over." At least not necessarily more difficult than the explicit loop
alternative.
An example -- Newton's method to find, say, the root of Tan[x] - x near
x = 4.5.
f[x_] := Tan[x] - x
A functional approach:
newtonStep[x_] := x - f[x]/f'[x]
NestList[newtonStep, 4.5, 10]
An iterative approach:
approx = {}; current = 4.5;
Do[current = newtonStep[current]; approx = Append[approx, current],
{10}]
approx
Of course one could modify either method to insert a stopping test (in
the functional approach, this would probably mean to use NestWhileList
instead of NestList).
Mathematica is "harder to read than BASIC" if all you know is BASIC.
And Russian is harder to read than English if all you know is English.
robert.prince-wright at shell.com wrote:
> This thread is an important one for the folks at Wolfram who are after all going to work to make a living by selling licenses. I was talking with another engineer last week about the kinds of work we did. I have stuck with Mathematica and resisted the path to other maths packages despite the fact that the vast majority of engineers have taken the 'easy' route. This has left me stranded in some ways since there is now a huge inventory of competent Math utilities - e.g. Roark and Young. Others have also increased the sophistication of their maths packages so that they can be used as a web integrated solution engine, much like webMathematica.
>
> One of the key benefits of the alternatives (I am told) is that they are easier to understand and there is more commonality with the normal Windows environment. I have to say after using Mathematica for research and having used it to teach the Applicable Mathematics course at The University of Glasgow (1990) I can easily say I hated using the well know alternative when I returned to Industry - unfortunately I was the only one in the office.
>
> I would guess that Wolfram would argue that Mathematica is aimed at a different market and there is some truth in that, however, having spent some time this morning looking at the competition I wonder if Wolfram are on a risky path since it's starting to look like Apple vs. Microsoft in the 90s.
>
> I think most would accept that David is correct in that the functional programming approach in Mathematica can result in code that is very difficult to read first time over. I end up having to unwrap the experts code when ever I'm looking to tap into Mathsource. Every now and then I am amused at how crafty some of you are when compacting code. The problem is not their code, nor the syntax, it's the fact that Mathematica makes it difficult to understand what's actually happening as, for example, we MapAll, MapThread, etc. a function onto a list, or list of lists. The current front end is still rather clunky and seems very underinvested. One simple way of helping people up the learning curve (or reminding occasional users like me) would be to have an optional window which dynamically shows a Short version of the effect of what were typing in. This would save people like me from having to repeatedly evaluate the complete expression in order to understand exactly what the outc
ome !
> will be. Something akin to the Java applet that animates Map, Apply etc.
>
> We all know that Mathematica 6.0 is coming and one can only imagine that the next quantum step in Mathematica is being delayed to align with Windows Vista - I'm just hoping that the 'next step' (bad pun for oldies!) is going to provide better support for the next generation of Mathematica users. Let's hope the fact my current job is being implemented near a place called Dinosaur is not my fate.
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
Prev by Date:
**Re: Is -1^(2/5) really undefined in R?**
Next by Date:
**Re: Re: Numerical evaluation is Mathematica bottleneck?!**
Previous by thread:
**RE: Re: General--Difficulties in Understanding Mathematica Syntax**
Next by thread:
**Re: RE: Re: General--Difficulties in Understanding Mathematica Syntax**
| |