On Thu, 24 Jan 2013 13:34:45 -0800, Adam D. Ruppe <[email protected]> wrote:

On Thursday, 24 January 2013 at 21:20:01 UTC, Jonathan M Davis wrote:
We wouldn't have all of these problems if we'd just
gone with a C#-esque property design

http://msdn.microsoft.com/en-us/library/w86s7x04(v=VS.80).aspx

"To the user of an object, a property appears to be a field, accessing the property requires exactly the same syntax."


Say it with me: properties are DATA FIELDS. Function syntax has NOTHING to do with them!

We could change function syntax to require you to draw out some ASCII art of a running cat.... and it shouldn't affect properties one bit.

Optional parens is a matter of function syntax. Properties are data fields, so function syntax doesn't matter to them.

The problem is that optional parens introduce ambiguity in relation to what is a property versus a function from the compilers prospective. So they are a matter of functional call syntax in that they are non-trivial for the compiler to deduce between the two.

--
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/

Reply via email to