Uniform function call syntax

Jacob Carlborg doob at me.com
Thu May 27 01:33:08 PDT 2010


On 2010-05-27 07.17, Robert Jacques wrote:
> On Wed, 26 May 2010 16:05:48 -0400, Jacob Carlborg <doob at me.com> wrote:
>
>> I've asked this before, probably several times: if and when will D get
>> the uniform function call syntax that has been talked about? Example:
>>
>> void foo (int i) {}
>> 3.foo();
>>
>> And please don't say it's already implemented because it isn't, I've
>> heard that before.
>>
>
> Is your patch still current or does it need to be looked at?
> (http://d.puremagic.com/issues/show_bug.cgi?id=3382)

1. I assume that the line numbers in the diff is not correct anymore, 
don't know how sensitive that is
2. As I say in the bug report literals don't work, i.e. 3.foo();, 
x.foo(); works though.

To make 2. work I assume additional changes need to made in the lexer 
and/or parser. What I've heard 2. will never work until ".1" and/or "1." 
are not allowed anymore.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list