Function calls
Don
nospam at nospam.com
Sun Jan 31 11:35:28 PST 2010
Nick Sabalausky wrote:
> "Pelle Månsson" <pelle.mansson at gmail.com> wrote in message
> news:hjv9sf$1n5o$1 at digitalmars.com...
>> On 01/29/2010 07:10 PM, Steven Schveighoffer wrote:
>>> Note in the anecdote above, both users would have
>>> been satisfied if you could *only* call empty without parentheses.
>>>
>> That's a good point. The writeln = 3; is also a good point. :)
>>
>> What I'm trying to defend is the ability to call non-property functions
>> without the parens.
>>
>> I find this:
>>
>> array.stable_sort;
>> file.detach;
>> range.popFront;
>>
>> to look less noisy, clearer and just plain sexier than the respective
>> versions with the parens.
>
> To me, at a glance, it looks like a series of no-ops. Like "x; y; z;". Only
> upon closer inspection of the names does it become apperent that functions
> are actually being called.
>
>
A consequence of this discussion is that the built-in properties
.reverse and .sort MUST be renamed. (Removal would be an acceptable form
of renaming IMHO).
More information about the Digitalmars-d
mailing list