[Date Index] [Thread Index] [Author Index]
Re: Replace and ReplaceAll -- simple application
On 1/1/10 at 9:16 AM, fateman at cs.berkeley.edu (Richard Fateman) wrote: >Bill Rowe wrote: ... >>That is, failure of any software to do what a user expects is >>certainly not a bug if that is what the software is documented to >>do. >False. >Here's why. By your definition, no program has a bug if the >programmer asserts that the program, by virtue of being written in a >high-level language, is its own readable documentation. Therefore >anything that the program does is documented by its own code and >therefore is not a bug. I agree there are those who lack sufficient integrity/honesty to admit error claiming whatever result is obtained is what was intended in the first place. But, I don't agree the existence of such people shows my definition above is equivalent to saying "no program has a bug". In short, your hypothetical is rather inane. >>The key problem here is a novice user of Mathematica might think of >>using replacement rules as doing mathematics. >Maybe he was confused by the title "Mathematica -- A System for >Doing Mathematics", and thought that Mathematica was a system for >doing mathematics. >>That simply isn't the case. >Apparently you thought that Mathematica was "A system for doing >rule-based syntactic transformations on FullForm expressions which >may or may not correspond to what is displayed" I am very much aware something as complex as Mathematica is not adequately defined by a simple one line statement. That is Mathematica is more than simply a system for doing mathematics or a system for doing rule-based syntactic transformations. If I was forced to define Mathematica is a simple one line statement it would be something along the lines of "Mathematica is a general purpose programming language with an emphasis on doing mathematics. " If Mathematica was limited to doing just valid mathematics, it would be significantly less powerful and useful than it is currently. >>And since replacing one thing with another is not mathematics, >>insisting the result makes sense mathematically simply isn't a >>realistic expectation. >TaDa. I couldn't have expressed it better myself. Insisting that >the results of a transformation is mathematically consistent, "isn't >a realistic expectation." >Which, in my view, demonstrates the existence of a bug. This would be a logical conclusion *if* the only allowed transformations where mathematical transformations. But since Mathematica provides the capability of doing far more than just mathematical transformations, it is very much unrealistic to expect a non-mathematical transformatino to be mathematically valid. And the fact such non-mathematical transformations exist certainly is a design feature not a bug. >I suppose one could try to determine who is right by a survey, or ask >people in the street what they think. And what would this accomplish? If I walk out to the street and ask those I encounter, my expectation is the overwhelming response would be "What is Mathematica?". Your entire point seems to be Mathematica should only return mathematically valid results and anything else is a "bug". This point ignores the fact that Mathematica is far more than a system for doing mathematics and consequently isn't a valid point.