Function calls
Steven Schveighoffer
schveiguy at yahoo.com
Thu Jan 28 07:28:56 PST 2010
On Thu, 28 Jan 2010 10:22:45 -0500, Adam D. Ruppe
<destructionator at gmail.com> wrote:
> On Thu, Jan 28, 2010 at 11:47:45AM -0300, Leandro Lucarella wrote:
>> Andrei Alexandrescu, el 28 de enero a las 07:57 me escribiste:
>> > I need to put it for all front() and empty() declarations. By the
>> > way I decided that popFront() is not a property. I don't know why.
>>
>> Because it denotes an action?
>
> I don't think it is that simple - I see popFront; as an action all the
> same as popFront();
Whether you use parentheses or not, it's not a property. The statement of
Andrei is that he doesn't know why it's not a property. The simple reason
is because it's an action.
Now, does popFront; look like an action? Yes. But that is not the case
being disambiguated. It is collateral damage. Because the compiler
doesn't understand English, it can't know whether to disallow popFront;
any more than an ambiguous term like read;. If there were a way to
enforce "only terms that are clearly denote actions can be called without
parentheses," I'd be all for it.
-Steve
More information about the Digitalmars-d
mailing list