Revised RFC on range design for D2
Sergey Gromov
snake.scaly at gmail.com
Thu Sep 25 13:34:09 PDT 2008
In article <gbgpak$2q10$1 at digitalmars.com>,
brunodomedeiros+spam at com.gmail says...
> Also, some more on important bike shed issues:
> for (; !src.done; src.next)
> {
> tgt.put(src.head);
> }
>
> As a matter of coding style conventions, I would say that using the
> implicit property function call feature on a function that changes state
> is *bad* style, and surely hope the community would agree on that.
> So "src.next" would be must better as "src.next()" as "src.next" really
> just makes me cringe.
I think that property function call feature in general adds an
unnecessary ambiguity to the language. I'd prefer functions to be
callable only with regular function call syntax, and properties be
usable only with member access syntax. The same stands for 'unified
function call' feature: if you want to inject a method into an 'array of
chars' class you do so explicitly, and only the member call syntax is
allowed on that method. Otherwise code tends to become ambiguous and
unreadable.
More information about the Digitalmars-d-announce
mailing list