On 01/25/2013 05:56 PM, Johannes Pfau wrote:
Am Fri, 25 Jan 2013 00:11:24 +0100
schrieb Timon Gehr <[email protected]>:
On 01/24/2013 04:45 PM, Johannes Pfau wrote:
Am Thu, 24 Jan 2013 09:20:44 +0100
schrieb Jacob Carlborg <[email protected]>:
On 2013-01-24 03:02, Nick Sabalausky wrote:
foo.bar() // Perform action
foo.bar // Access data
Who says it has to be like this.
.NET guidelines since .NET 1.1 for example:
"In general, methods represent actions and properties represent
data." (http://msdn.microsoft.com/en-us/library/bzwdh01d%28v=vs.71%29.aspx).
This is not C#.
I think I misunderstood the question. If the question was whether the
parenthesis mark an action as opposed to data access, then my
statement is of course void. (But it's a tradition from C that () mark
function calls).
I thought he meant properties should be used for data access. This is
almost by definition: Java used setX /getX, C# formalized that into
properties, D took properties from C#. Properties where always used
for data access, if you don't use properties for data access but for
other things the whole concept doesn't make sense. So in that case
"this is C#".
...
I think he meant both. =)