Re: Re: Programming style
- To: mathgroup at smc.vnet.net
- Subject: [mg47654] Re: [mg47608] Re: Programming style
- From: schmitther at t-online.de (Hermann Schmitt)
- Date: Tue, 20 Apr 2004 03:19:17 -0400 (EDT)
- References: <c5qj4q$fvh$1@smc.vnet.net> <200404180815.EAA18000@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Programming Method The Mathematica users like to speak of functional programming as their programing method. But most of them do not adhere to the functional method as it is described as a programming method in the literature. Other programming languages use functions, too, and I think most of the users in reality use the procedural programming method. What makes stand out Mathematica are the powerful functions it has. But that is only a gradual difference compared with other programming languages. Object oriented programming is often considered an alternative to the procedural programming method. But in the case of Mathematica I see the object oriented method more as a source of additional functionality, which does not alter the programming style fundamentally. At least in the case of my implementation (see: www.schmitther.de), oo brings a new kind of packages, which - in combination with the oo system software -, offers new functionality. As in the case of the standard Mathematica packages the creator of the package and the users of the package will often be different persons. Hermann Schmitt ----- Original Message ----- From: "Mark Westwood [EPCC]" <markw at epcc.ed.ac.uk> To: mathgroup at smc.vnet.net Subject: [mg47654] [mg47608] Re: Programming style > Lorenzo > > Here's my five-pennyworth, I expect that many others in this newsgroup > will chip in with their own strongly-held, entirely reasonable and > mutually contradictory opinions: > > Yes, it is worth the effort to learn the Mathematica way of doing > things, the 'functional' method as you put it, just as it is worth the > effort to learn the object-oriented way when learning Java or Smalltalk > etc. Their are two reasons for making the effort: > > 1) equivalent programs written in the functional style and the > procedural style usually execute faster, in Mathematica, in the > functional style; > > 2) functional programs are often shorter, easier to write and easier to > understand than procedural programs - once you have enough experience of > Mathematica that is; > > 3) writing functional-style programs is much more natural in Mathematica > than writing procedural programs; when I try to write procedural > programs in Mathematica I always feel that I am fighting against the > system rather than with it. > > (OK, so that make's three reasons ...) > > In my second paragraph I place the word functional in quotation marks, I > won't be surprised to read other answers to your enquiry which deny > that Mathematica is a functional language - pure functional languages > don't do assignment for instance. I think it's functional enough to be > considered a functional language. But you should also make some effort > to get your head around the concept of Mathematica as a term rewriting > system, transforming expressions in one form into an equivalent (usually > simpler) form. > > If the book you have is the one by Nancy Blachman then stick with it. I > think it is the best introductory text for general purpose Mathematica. > Once you've finished with it you will be ready to digest The > Mathematica Book itself. > > good luck > > Mark > > > 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 > > >
- References:
- Re: Programming style
- From: "Mark Westwood [EPCC]" <markw@epcc.ed.ac.uk>
- Re: Programming style