What about an identifier that is an mixin

Daniel Kozak via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 13 15:13:43 PST 2017


On Friday, 13 January 2017 at 22:12:55 UTC, André Puel wrote:
>
> Could you elaborate on why you consider it important to be able 
> to tell when you use mixin and when not?

because it is something really different, so it is nice to know 
when you call something and when you mixin some code into curent 
scope.

Btw. I was on a same side as you are now (I am still in some way, 
I would prefer some shortcuts)

> In D, you don't know if a member is a function call or an 
> attribute when you access it without parenthesis:
>
>     myObj.a; //Is it a function call or an attribute?
>

Not completly true:

class MyClass
{
     int a;
     void b() {}
}

void main()
{
     auto myObj = new MyClass;
     myObj.a; // this does not compile
     myObj.b;
}




More information about the Digitalmars-d mailing list