Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: Fortran vs. C for numerical work - expression notation Message-ID: <8366@lanl.gov> Date: 9 Dec 90 21:56:23 GMT References: <16799@csli.Stanford.EDU> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 46 From article <16799@csli.Stanford.EDU>, by poser@csli.Stanford.EDU (Bill Poser): > [...] > Second, my experience has been that people who study mathematics > at all seriously, both pure and applied, are comfortable with a wide > variety of notations. [...] None of which resemble C - even remotely. And, most of those different notations confer some advantage in a specific corner of the problem domain (with _clarity_ the highest criterion). C notation confers no such advantages and clarity seems to have been on the bottom of the list there. > [...] It is very difficult for me to believe that the difference > between infix and prefix power functions and the like can make much > of a difference to anyone doing serious mathematical computation. You again make the incorrect assertion that this is the only difference. I regard this as an important difference, but not as important as most of the others. > [...] > Is there any evidence that it actually matters? Yes. There are 40+ operators in C and 15 precedence levels. Almost none of this matches any notational or precedence convention in any known problem domain. It also doesn't match or resemble conventions used by any other programming language. This is widely regarded as one of the reasons that C is hard to learn to use _effectively_. Further, there are several specific experimental results regarding side-effects - specifically that assignment should be a statement level operator and _not_ an expression level operator. > [...] > Regarding Piercarlo Grandi's argument that programming notation > should differ as much as possible from mathematical notation, > I am not terribly sympathetic. I suspect that this will just > make people spend their time learning the funny new notation, not > make them think harder about how actual digital computation differs > from symbolic or ideal continuous numerical computation. [...] Interesting. That is a very succinct and accurate restatement of the argument I made in the last article about learning C syntax. So, you see the problem - I just don't understand how you fail to see that it applies to C. J. Giles