new DIP5: Properties 2
Ary Borenszweig
ary at esperanto.org.ar
Fri Jul 31 19:39:20 PDT 2009
Andrei Alexandrescu escribió:
> Steven Schveighoffer wrote:
>> On Fri, 31 Jul 2009 16:53:12 -0400, Andrei Alexandrescu
>> <SeeWebsiteForEmail at erdani.org> wrote:
>>
>>> Steven Schveighoffer wrote:
>>>> But in the case of properties only allowed without parens, functions
>>>> require parens, you are defining a rule for the compiler. Think of
>>>> the parentheses as an extension of the function name, like punctuation.
>>>
>>> But you say no parens means query, parens means action. This is sheer
>>> unchecked convention.
>>
>> But we already have sheer unchecked convention! I could make a
>> function called sort that reverses an array.
>
> Of course we do. My point is that there's no need to add gratuitous
> mechanisms fostering conventions that go unchecked.
>
>> I don't get why it makes any difference to you that the meaning of
>> parentheses and no parentheses is used by the author of the function.
>> How is this bad or somehow worse than what we have now? If you don't
>> trust the author's functions do what they are named for, don't use his
>> functions and properties.
>
> Well you can trivialize all you want but the matters are different. It's
> one thing to have good names, good designs, trusted code etc. and a
> whole different thing to define a feature of which entire existence only
> serves only an unchecked convention.
Like... ddoc?
More information about the Digitalmars-d
mailing list