Is the -property compiler flag broken/bad idea?

Timothee Cour thelastmammoth at gmail.com
Wed Jun 5 13:55:30 PDT 2013


I had a better proposal:

http://forum.dlang.org/thread/rftboygivwmwizeywygm@forum.dlang.org
optional parens everywhere except last position of function chain.

This makes it visually unambiguous what is a function vs function call and
avoids all but last parens, makes @property/(-property) obsolete, and makes
&foo operator un-necessary.

snippet:

When a,b,c are non-property functions:
a.b.c(); => a().b().c(); // c is called
a.b.c; // c function not called


What do you guys think?

On Wed, Jun 5, 2013 at 1:47 PM, Namespace <rswhite4 at googlemail.com> wrote:

> On Wednesday, 5 June 2013 at 20:43:54 UTC, Namespace wrote:
>
>> I use @property consistently because I think it is absolutely ugly and
>> confusing to call functions without brackets or to mix both versions.
>>
>
> To specify this point:
> I think it's ugly and confusing to be able to call *all* functions without
> brackets. If I (or someone else) think it is appropriate I (he) should mark
> such functions explicit with @property.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20130605/722ca33b/attachment.html>


More information about the Digitalmars-d-learn mailing list