Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Unacceptable bug in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93525] Re: [mg93509] Unacceptable bug in Mathematica
  • From: "Savas Nesseris" <s.nesseris at gmail.com>
  • Date: Thu, 13 Nov 2008 21:05:36 -0500 (EST)
  • References: <200811130902.EAA13922@smc.vnet.net> <491C3C16.2000805@wolfram.com>

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*...

Cheers

PS Thanks for clarifying this point with SyntaxQ

2008/11/13 Daniel Lichtblau <danl at wolfram.com>

> psycho_dad wrote:
>
>> The other day, a friend discovered something that may qualify as a
>> major bug in Mathematica (tested in 6.0.3):
>>
>> SyntaxQ["Exp[]"]
>>
>> (notice that Exp has no argument) returns
>>
>> True !!!!
>>
>> According to the documentation:
>>
>> SyntaxQ["string"] returns True if the string corresponds to
>> syntactically correct input for a single Mathematica expression, and
>> returns False otherwise.
>>
>> At least for me Exp[] is not syntactically correct. I expected more
>> from Mathematica...
>>
>> Cheers
>>
>
> There is no room for ambiguity in this sort of thing. Either it is
> syntactically well formed, or it is not. This one is, in the sense of
> Mathematica syntax. Just like the variant below.
>
> In[1]:= SyntaxQ["exp[]"]
> Out[1]= True
>
> 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.
>
> On a side note, related to another recent post...if you type Exp[] in a
> version 6 front end, you will see a red arrow between the brackets,
> indicating that there seems to be something "missing". So what we refer to
> as "syntax highlighting" really knows a bit of the language semantics (and
> goes well beyond just lexical analysis).
>
> Daniel Lichtblau
> Wolfram Research
>



  • Prev by Date: Re: Unacceptable bug in Mathematica
  • Next by Date: Re: Storing and Loading Definitions / Emulating Associative Arrays
  • Previous by thread: Re: Unacceptable bug in Mathematica
  • Next by thread: Re: Re: Unacceptable bug in Mathematica