Re: procedural style?
- To: mathgroup at smc.vnet.net
- Subject: [mg9639] Re: [mg9628] procedural style?
- From: "W. Meeussen" <w.meeussen.vdmcc at vandemoortele.be>
- Date: Mon, 17 Nov 1997 19:49:47 -0500
- Sender: owner-wri-mathgroup at wolfram.com
richard, your point that "good programs" should be written in a consistent and homogeneous "style" looks valid to me. Is there a reason why it should be non-procedural ? Some time ago, there were spontaneous "programming competitions" on this forum. They thaught me stuff i wouldn't have discovered on my own. The Mathematica language is flexible and consistent in design so that very different "styles" can lead to very different "good programs". They can be optimised for speed, clarity, memory use, brevity or just plain "tacky-ness". I think this comes out most clearly in problems that have to do with combinatorics. It would be nice to collect some samples in a demo notebook to illustrate the diversity of "styles" currently in vogue. wouter. PS. with "tackyness", i mean a style like in : In[58]:={1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0}; In[59]:=%+0(n=1)/. 1:>n++ /.n->(n=.) Out[59]={0, 0, 0, 1, 2, 0, 3, 0, 0, 4, 0} At 21:40 14-11-97 -0500, richard j. gaylord wrote: >In article <64fh6e$c6s$5 at dragonfly.wolfram.com>, "Sherman.Reed" ><sherman.reed at worldnet.att.net> wrote: > > >> 3. Mathematica is not for the faint hearted, it a serious and >> complicated computer based algebra tool for engineers and scientists >> who want to push the frontier, and are willing to pay the price for >> success. > >you shouldn't generalize like that; it unnecessarily scares off people. > >it may have been hard for you to master, but for alot of other people >it's easy to learn to use [my students learn to write good programs in >mathematica in a month's time once they are forbidden to use procedural >style]. > >my experience is that if you don't take the right approach, it can >indeed be difficult - but then its kind of difficult to reach >california by driving east from the midwest too :) > >-richard- > >-- >richard j. gaylord, university of illinois, gaylord at uiuc.edu > >"What I cannot create, I do not understand" > -Richard P. Feynman- > > Dr. Wouter L. J. MEEUSSEN w.meeussen.vdmcc at vandemoortele.be eu000949 at pophost.eunet.be