Revised RFC on range design for D2
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Fri Sep 26 04:15:29 PDT 2008
Sergey Gromov wrote:
> 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.
Yes, I full agree, as many others do, as this has been discussed before
(the latest discussion:
http://www.digitalmars.com/d/archives/digitalmars/D/Omittable_parens_is_an_evil_73881.html)
But that didn't seem to convince any of the higher-ups, so I was hopping
to at least have the feature used more sensibly (ie, not being used in
functions that are not intended to emulate properties).
--
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d-announce
mailing list