Re: Metastable expressions in Mathematica
- To: mathgroup at smc.vnet.net
- Subject: [mg119715] Re: Metastable expressions in Mathematica
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Sat, 18 Jun 2011 06:22:03 -0400 (EDT)
- References: <201106141014.GAA06248@smc.vnet.net> <ita4j9$mb1$1@smc.vnet.net> <201106170410.AAA28905@smc.vnet.net>
On 06/16/2011 11:10 PM, Richard Fateman wrote: > On 6/15/2011 4:21 AM, Leonid Shifrin wrote: >> Hi David, >> >> This is a known effect. There is a special command Update, used in such >> cases to force Mathematica to propagate changes like the one you discuss. >> > > It is, in some views, an error, to define and implement a programming > language with a semantics that is not deterministic, but depends on (for > example) on the page in random access memory on which an expression is > stored, to tell how it will be evaluated. > > Or call Update. > > I suspect this "feature" is unique to Mathematica among programming > languages commercially supported. The fact that this is "known" to some > people does not make it harmless. The fact that it almost never affects > people does not make it harmless either. > > RJF I do not see how this feature (of needing Update to handle conditional dependencies) is nondeterministic. Certainly it is documented in a way that implies it would be deterministic with respect to memory layout. See Documentation Center > Update > Basic Examples. As for harmlessness, I'd suggest that use of conditional definitions in a way that would require Update is, in effect, signing a release form. Something to the effect "I am a mature programmer and understand that my funky code might have unanticipated consequences. I will debug it as needed and not make a huge fuss over it on Usenet. (Did I mention that I am a mature programmer?)" Getting to the issue raised of design philosophy, I will comment that a language not requiring an Update would probably be less well able than Mathematica to emulate infinite evaluation. Some people like that feature of evaluation semantics, others do not. While it predates my time here, I am fairly sure infinite evaluation was an intentional aspect of the Mathematica design. (Would be ironic, though, if we today were all adhering to what was originally a coding error that escaped the laboratory...) Daniel Lichtblau Wolfram Research
- References:
- Metastable expressions in Mathematica
- From: David Bailey <dave@removedbailey.co.uk>
- Re: Metastable expressions in Mathematica
- From: Richard Fateman <fateman@cs.berkeley.edu>
- Metastable expressions in Mathematica