Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Programming style

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

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 handbag.com 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 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: 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