Property discussion wrap-up

John Colvin john.loughran.colvin at gmail.com
Mon Jan 28 03:33:01 PST 2013


On Monday, 28 January 2013 at 07:55:23 UTC, Dicebot wrote:
> On Monday, 28 January 2013 at 00:07:05 UTC, Andrei Alexandrescu 
> wrote:
>> I find this a very fluid style of programming that I'd hate to 
>> lose.
>
> And that would have been a very important argument if D was 
> targeted as scripting language. But (I hope so!) it is not, 
> thus, additional well-defined reasoning about the code is more 
> important then the "fluid style". IMHO, of course.

I agree. The clarity of logic in the language should be a 
priority here.

UFCS is a fine balance, on one hand you can significantly gain 
readability, on the other hand you can't tell by eye if something 
is a member function unless you look it up.

Optional parenthesis takes it another step further, meaning that 
suddenly you can't tell the difference between a member function, 
a field or an normal function. To me this seems a step too far.

Properties themselves do introduce this ambiguity (when reading 
code), but they do so in a controlled and contained manner, as 
opposed to the free-for-all that optional parenthesis enable.


More information about the Digitalmars-d mailing list