2 ms·
> the parentheses of methods obviously work as a compiler-mandated "style" that make it obvious that you're running a method The ambiguity is between propertie
by MaxBarraclough 6y ago
> the parentheses of methods obviously work as a compiler-mandated "style" that make it obvious that you're running a method
The ambiguity is between properties and fields, not between properties and methods. Looking at the style guide, I don't think there's any difference between how public fields and public properties are styled in .Net. [0]
> Whether that is casing or syntax highlighting or naming conventions, I don't care very much, as long as there's something.
Ideally it shouldn't rely on fancy tooling. I'd rather it be clear in the plain text of the source.
> you could name the getter for x "setY()", and make it delete the entire filesystem when you call it. You can't guard against stupidity like that
It's true, we don't yet have a language that prevents poor choice of identifiers.
[0] https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/names-of-type-members https://docs.microsoft.com/en-us/dotnet/standard/design-guid...