MathGroup Archive 2008

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

Search the Archive

Re: Unacceptable bug in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93545] Re: [mg93509] Unacceptable bug in Mathematica
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Thu, 13 Nov 2008 21:09:12 -0500 (EST)
  • References: <200811130902.EAA13922@smc.vnet.net> <491C3C16.2000805@wolfram.com> <14c5433a0811130709n6d3e3162jc896d1ca1537dd6c@mail.gmail.com>

Savas Nesseris wrote:
> Dear Daniel,
> you say that:
> "Maybe you have in mind that Exp, being a built in "function" (that is, 
> a symbol with DownValues attached to it), should require an "argument". 
> Well and good, but that's progamming language semantics, not syntax."
> 
> OK I accept this, however then you (Wolfram Research) should remove the 
> following comment from the documentation of SyntaxQ, as it is misleading:
> "When SyntaxQ gives True, the string can be converted to an expression:"
> 
> And definately,
> 
> "Exp[]" // ToExpression
> 
> does not give /*a valid expression*/...

But in fact it does give a (syntactically) valid expression. Yes, it 
also gives a warning message. But that is based on semantic considerations.

I should mention that a "syntactically valid expression" is, by 
definition, anything that Mathematica will parse. Here is a related 
example of something that is not syntactically valid.

In[3]:= ToExpression["Exp[)"]

ToExpression::sntx: Invalid syntax in or before "Exp[) ".
                                                       ^

Out[3]= $Failed

SyntaxQ tells us, correctly, that we should have expected that one to fail.

In[4]:= SyntaxQ["Exp[)"]
Out[4]= False


> Cheers
> 
> PS Thanks for clarifying this point with SyntaxQ
> [...]

Daniel Lichtblau
Wolfram Research



  • Prev by Date: Re: Analyzing sequences of fractions in Mathematica
  • Next by Date: Re: Unacceptable bug in Mathematica
  • Previous by thread: Re: Unacceptable bug in Mathematica
  • Next by thread: Re: Unacceptable bug in Mathematica