On Jun 29, 2005, at 11:09 PM, Norman Palardy wrote:
On Jun 29, 2005, at 7:48 PM, Mars Saxman wrote:
On Jun 29, 2005, at 6:19 PM, Stefan Pantke wrote:
I asked for an EBNF, since this generates a compiler error:
"the beginning" + (New Date()).SQLDate() + "and the end"
I don't see an error here. Do you?
Not exactly... but I do see evidence of a very tricky language
design problem, which has surprising yet unavoidable consequences.
A parenthesized subexpression is never a valid left-hand term for
the dot operator.
That's an interesting thing to note.
Can I ask why not ?
In a situation like this, it becomes ambiguous:
Sub Foo( s as String )
... do something
End Sub
Function Foo( d as Date ) as Date
... do something
End Function
Foo(new Date).SQLDate
Disallowing the dot operator on a parenthesized subexpression allows
you to know that "new date" in this context will always be considered
to be a parameter to the Foo function. Granted, the above is a very
tricky thing that I wouldn't ever want to see in my project (the
overloaded Foo taking different types, and lacking or returning a
different type), it's still technically legal.
-Jon
--
Jonathan Johnson
REAL Software, Inc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|