MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Mathematica language issues

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53126] Re: [mg53098] Re: Mathematica language issues
  • From: DrBob <drbob at bigfoot.com>
  • Date: Fri, 24 Dec 2004 05:59:16 -0500 (EST)
  • References: <cqbh9b$4k4$1@smc.vnet.net> <200412231258.HAA21153@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

I don't think Mathematica's behavior is random; but I don't find it to be predictable, either. That's my own ignorance in part, but Maxim has convinced me I'd have to know ALL Mathematica's rules in order to predict the behavior of Unevaluated in fairly simple (but general) situations.

I sympathize with Andrzej's belief that it's sufficient to experiment until we are sure what will happen in the cases we're interested in. But we can't write functions for unknown inputs without SOME ability to predict outcomes.

I can't argue with Andrzej's claim that Maxim's examples have no real use, either -- the Villegas article uses examples that matter (and shows how to control the "randomness" so everything works out right).

So... I have to say, Unevaluated's behavior IS tough to predict, but using it carefully makes it a very useful feature.

Bobby

On Thu, 23 Dec 2004 07:58:59 -0500 (EST), Richard J. Fateman <fateman at eecs.berkeley.edu> wrote:

> You pretty much miss the point.
> If you go into an elevator and press the button
> labeled "4" you expect the elevator to (eventually)
> stop at the 4th floor.  If you press two buttons
> simultaneously, say "3" and "4" you would probably be
> OK with one of these outcomes.
> 1. Only 3 lights up
> 2. Only 4 lights up
> 3. Both 3 and 4 light up
> 4. Neither lights up.
>
> You would not be happy if, for example, the elevator
> stopped half-way between the floors, or if it
> blew up.
>
> This is the case even if pressing two buttons simultaneously
> does not have any practical importance.
>
> Good programming languages and systems should not
> behave in arbitrary, inconsistent, and apparently
> inexplicable fashion -- (that is, There
> are behaviors that may seem inexplicable to the naive --
> but they can be explained eventually.)
>
> You say this over and over.
> "the program does X. the program has no bugs. the
> behavior X is a feature."
>
> I encourage you, once again, to read a book on programming
> language design principles.  Tell us if you find one that says
> "This statement is legal, but not important, so
> we can do something random."
>
> Regards.
>
> RJF
>
>
>
> Andrzej Kozlowski wrote:
>> I think most people this entire discussion does not have any practical
>> importance. Obviously something like this:
>>
>>
>> 2*Unevaluated[1+1]
>>
>>
>> 2 Unevaluated[1+1]
>>
>> is extremly unlikely to have any practical use.
>
>
> <<<<<<big snip>>>>>>>
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Mathematica language issues
  • Next by Date: Re: Re: Sequential evaluation of lists
  • Previous by thread: Re: Mathematica language issues
  • Next by thread: Mathematica language issues