Re: what kind of a programming language is Mathematica?
- To: mathgroup at smc.vnet.net
- Subject: [mg49270] Re: what kind of a programming language is Mathematica?
- From: AES/newspost <siegman at stanford.edu>
- Date: Sat, 10 Jul 2004 02:48:42 -0400 (EDT)
- References: <cclfk4$kfa$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <cclfk4$kfa$1 at smc.vnet.net>, gaylord at uiuc.edu (richard j. gaylord) wrote: > One of the reasons that many people have problems with writing > Mathematica programs is that they fail to understand how Mathematica > evaluates an expression that has been entered and this is directly > related to how Mathematica works as a TRS. In order to program in > Mathematica, it is ESSENTIAL to understand the evaluation process. > ------------(stuff snipped)--------------------- > > a final note regarding elegant vs. non-elegant programming - note: > RJF: don't feel compelled to make a response to this, especially of > a personal , nasty nature. as it might set off my ICD :) - the > issue of elegance in programming is very much a personal matter (de > gustibus non disputum). i personally love the style of APL and J which > is so succinct and compact (the famous one-liner) but barely > readable. On the other hand a program consisting of a series of > rewrite rules employed in a shell for applying the rules' is very > appealing to me (and my students have indicated the same). it makes > modifying the program trivial - all one has to do is delete, add, or > change the rules. the longer runtime the program may take to execute > allows one to think of other things or go do something else. Thanks for generosity in donating this stuff. I guess I was brought up on numerical computing at a stage when if you wanted to do some calculation, such as solve a set of linear equations or invert a matrix or whatever, you learned how to do this from a book (like maybe Hamming's famous text; was matrix inversion called the Cayley-Hamilton method?); attempted to understood the process yourself; then coded it into a procedural language step by step; then ran that program. [Actually, I go back far enough that there was an initial stage when you carefully planned and wrote the detailed step-by-step instructions, took them upstairs to where the computation staff was based (one of ours had literally been at one time a cavalry officer in the Austrian Imperial army), and they tediously and methodically ran through them time after time by hand, using Marchant mechanical accumulating calculators with huge 100-key keyboards.] As a result, though I've become an intensive Mathematica user, I have a very hard time moving beyond a procedural programming way of thinking and coming to grips with rule-based programming or, worse, pattern-matching calculations. Only if I can read a program and follow all the DO loops and the rest of the explicit program flow do I feel I understand what's happening and have confidence that the program is doing what I want it to do. So, I'll look forward to your notes (and hope, some day, to understand object-based programming as well). Just one minor quibble: Look back at your first paragraph and consider that not all of us may know what "TRS" stands for. At least I don't, though I can make a guess.