MathGroup Archive 2004

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

Search the Archive

Re: Programming style

  • To: mathgroup at
  • Subject: [mg47611] Re: [mg47597] Programming style
  • From: Murray Eisenberg <murray at>
  • Date: Sun, 18 Apr 2004 04:15:08 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <>
  • Reply-to: murray at
  • Sender: owner-wri-mathgroup at

While you _can_ use various paradigms when programming in Mathematica, 
the functional approach has several advantages, including:

(1) efficiency;

(2) clarity and readability -- once you know how to read functional 
constructs -- for two reasons:

     (a) programs are shorter, hence easier to take in at a glance;

     (b) you can think, and program, at a higher level, leaving 
implementation details to the Mathematica interpreter.

Don't neglect the advantages, too, of using "array-oriented" programming 
and pattern-matching.

lorenzo.keegan at wrote:

> Hello,
> I am an experienced computer programmer having used ADA, C, Visual Basic
> etc. for years.
> Recently I bought the book "Mathematica - A Practical Approach", where different
> styles of programming are discussed, namely
> Functional programming versus Procedural programming.
> The book seems to suggest that most Scientist and "professional" Mathematica
> users prefer the Functional programming approach.
> For years I have been working with the "Procedural" method.
> What are your feelings ? Is it worth the effort to learn the Functional
> method ? Does it matter ?
> Thanks for your time
> Best Wishes
> Laurence Keegan  

Murray Eisenberg                     murray at
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: Programming style
  • Next by Date: Plotting 3-trees in 6 vertices and evaluating their Prufer codes.
  • Previous by thread: Re: Programming style
  • Next by thread: Re: Programming style