support UFCS with fully qualified function names (was in "digitalmars.D.learn")

Timothee Cour thelastmammoth at gmail.com
Tue May 21 01:31:36 PDT 2013


> you can use a property function as a normal function if you have to.

I must've missed that. Do you mean this will become valid?
struct A{
  int x_;
  @property int x(){return x_;}
}
void main(){
A a;
int x1=a.x();
int x2=a.x;
}

> I don't think that it's really much of a loss to not be able to use UFCS
in situations like that

I keep running into such situations, because phobos reuses function names a
lot in different modules, and it's only going to get worse as phobos size
increases.

On Tue, May 21, 2013 at 1:22 AM, Jonathan M Davis <jmdavisProg at gmx.com>wrote:

> On Tuesday, May 21, 2013 09:51:14 Dicebot wrote:
> > I think added syntax complexity is not worth the convenience gain.
>
> I tend to agree. I don't think that the idea is entirely without merit,
> but I
> don't think that it's really much of a loss to not be able to use UFCS in
> situations like that. The only situation where it could pose a major
> problem
> would be with properties, but if we're not going to have strict properties
> (and it seems pretty clear at this point that we're not going to), then it
> doesn't really matter, because you can use a property function as a normal
> function if you have to.
>
> - Jonathan M Davis
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130521/80a1fa85/attachment.html>


More information about the Digitalmars-d mailing list