Property discussion wrap-up
Zach the Mystic
reachBUTMINUSTHISzach at gOOGLYmail.com
Sun Jan 27 18:40:09 PST 2013
On Monday, 28 January 2013 at 00:07:05 UTC, Andrei Alexandrescu
wrote:
> BTW also regarding optional parentheses, while I was working on
> https://github.com/D-Programming-Language/tools/pull/41/files I
> refactored a bit of code to use UFCS and paren-less syntax. I
> must say I find this a very fluid style of programming that I'd
> hate to lose.
>
> One more thought - though optional parens and properties are
> distinct issues, there is some interaction: optional parens
> reduce the need for @property annotation on read-only
> properties.
>
>
> Andrei
I'm sorry for answering twice, but I think I understand something
that I didn't before. I was taking it as a _given_ that optional
parentheses are here to stay. I was only proposing that the
compiler give an error when it has two valid choices which both
compile legally. I'm pretty sure actual cases where you are
forced to use either "()" or "cast(function)" are going to be
rare. In most cases, only one version of the code will actually
compile. Another consideration is that testing for all these
cases may increase compilation time, whereas silently giving one
type priority over the other will not.
More information about the Digitalmars-d
mailing list