MathGroup Archive 2006

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

Search the Archive

Re: Re: General--Difficulties in Understanding Mathematica Syntax

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69037] Re: [mg69006] Re: General--Difficulties in Understanding Mathematica Syntax
  • From: "Chris Chiasson" <chris at chiasson.name>
  • Date: Sun, 27 Aug 2006 01:24:20 -0400 (EDT)
  • References: <echdk4$oir$1@smc.vnet.net> <ecmgpr$9b3$1@smc.vnet.net> <200608260604.CAA02766@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

It's gotten to the point where I don't even attempt to read or
understand Mathematica code if it's written with Do, For, or While.

On 8/26/06, AES <siegman at stanford.edu> wrote:
> In article <ecmgpr$9b3$1 at smc.vnet.net>,
>  Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com> wrote:
>
> >
> > Now, it is utterly better to use high-level constructs such as Map,
> > Thread, Apply, ... when you code in Mathematica.
> >
>
> I don't exactly quarrel with this -- but I sure don't fully accept it
> either.
>
> Concepts like Map[ ], Thread[ ], Apply[ ] are thoroughly understood by
> adepts, and marginally understood by some of the rest of us.  They're
> not concepts, or terms, commonly used in everyday speech.  And they may
> have some hidden subtleties in their operation, even some "gotchas", in
> how they apply to what's inside the [ ]s.
>
> Constructs like Do[] , If[ ], While[ ] are fairly likely to be
> understood not just by adepts, but by anyone who's ever done even very
> elementary programming in (horrors!) BASIC.  Their programming use
> matches up pretty well with the same terms in everyday speech.  They
> make the flow of the program logic more obviously visible (at least to
> us non-adepts).  And I suspect they have fewer hidden gotchas.
>
> Writing complex Mathematica expressions as dense, deeply nested,
> sometimes lengthy expressions full of arcane shorthands ("\\@", etc) is
> akin to writing dense, arcane, possible lengthy prose sentences full of
> arcane terminology.  Writing them as short, crisp, clear constructs, one
> task at a time, is like writing short, crisp, clear prose sentences.
> The people who construct "readability indexes" for prose have some
> opinions about this.
>
> [We all, of course, fondly remember APL:  "Code once, read or modify
> never".]
>
> What is it that's actually **better** (for the "ordinaryt user") about
> these more sophisticated constructs?
>
> *  Readability? -- except for adepts, I don't think so.
>
> *  Faster, more efficient execution? -- perhaps so, but in the vast
> majority of cases, who cares?!?
>
> *  More accurate execution?  -- I sure hope not.
>
> *  Shorter code (fewer characters)? -- again, who cares?!?
>
> *  Bragging rights (I can accomplish the task with fewer characters than
> anyone around)? -- Well, that was a very salable skill, in magnetic core
> and assembly language days.
>
> Again, to each his own.  Part of the genius of Mathematica is that it
> serves the novice user and the sophisticated adept.  But "better"?
>
>


-- 
http://chris.chiasson.name/


  • Prev by Date: Re: General--Difficulties in Understanding Mathematica Syntax
  • Next by Date: Re: General--Difficulties in Understanding Mathematica Syntax
  • Previous by thread: Re: General--Difficulties in Understanding Mathematica Syntax
  • Next by thread: Re: Re: General--Difficulties in Understanding Mathematica Syntax