Property discussion wrap-up
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Jan 28 05:20:23 PST 2013
On 1/28/13 1:10 AM, Zach the Mystic wrote:
> On Monday, 28 January 2013 at 04:42:34 UTC, Andrei Alexandrescu wrote:
>>> Do you think the Ferrari (i.e. optional parens) has got
>>> what it needs under the hood?
>>
>> I'm not sure I understand the question.
>
> Just that the elegant appearance of UFCS and optional parens isn't
> offset underneath by built-in ambiguities which lead to problems either
> with compiling wrongly or with making the code difficult to read. I
> don't really need an answer.
It's a pertinent question. (I didn't know Ferrari is a crappy car :o))
One interesting fact is that we have evidence at hand. Optional parens
_exist_ today in D, and have for a while. The language has worked. They
haven't been a disaster. Aside from discussions about @property itself,
optional parens have just worked. We also have evidence that UFCS is
convenient and useful. People use it and like it. And arguably UFCS and
optional parens combine in a lovely way.
We've also converted the Phobos codebase to work with the half-strong
-property switch. We've adorned a lot of functions with @property. I
don't see evidence of found bugs or improved code quality.
(Subjectively, I'd argue we actually degraded esthetics. There's no love
lost between me and that "@property" plastered everywhere.)
These are not "what if" hypotheses; they describe experience accumulated
from past events. Even people who dislike optional parens or UFCS must
agree that their sentiment is far from widespread - unlike, for example,
was the case for string lambdas.
Andrei
More information about the Digitalmars-d
mailing list