Re: __traits(getMember)

2016-11-03 Thread Márcio Martins via Digitalmars-d
On Wednesday, 2 November 2016 at 19:49:24 UTC, Jacob Carlborg wrote: On 2016-11-02 17:30, Márcio Martins wrote: Can we get a getMember and a getOverloads that won't check for visibility or anything else? __traits appears really powerful, but every-time I try to use it for anything other than a

Re: __traits(getMember)

2016-11-02 Thread Jacob Carlborg via Digitalmars-d
On 2016-11-02 17:30, Márcio Martins wrote: Can we get a getMember and a getOverloads that won't check for visibility or anything else? __traits appears really powerful, but every-time I try to use it for anything other than a toy example or very simple serialization, it seems like everything fal

Re: __traits(getMember)

2016-11-02 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, November 02, 2016 16:30:04 Márcio Martins via Digitalmars-d wrote: > Can we get a getMember and a getOverloads that won't check for > visibility or anything else? That's coming. There was a big discussion on it after the import rules were changed. But IIRC, it was decided that we wo

__traits(getMember)

2016-11-02 Thread Márcio Martins via Digitalmars-d
Can we get a getMember and a getOverloads that won't check for visibility or anything else? __traits appears really powerful, but every-time I try to use it for anything other than a toy example or very simple serialization, it seems like everything falls apart due to some detail... and I end

Re: __traits(getMember) and uniform call syntax

2010-10-16 Thread Jonathan M Davis
On Saturday 16 October 2010 17:03:51 Tomek Sowiński wrote: > What's the status quo on member functions defined outside the type? > > import std.array; > > void main() { > int[] arr = [1,2]; > > // compiles, should it? > int a = __traits(getMember, arr

Re: __traits(getMember) and uniform call syntax

2010-10-16 Thread Tomek Sowiński
Tomek Sowiński napisał: > What's the status quo on member functions defined outside the type? > > import std.array; > > void main() { > int[] arr = [1,2]; > > // compiles, should it? > int a = __traits(getMember, arr, "front"); > &

__traits(getMember) and uniform call syntax

2010-10-16 Thread Tomek Sowiński
What's the status quo on member functions defined outside the type? import std.array; void main() { int[] arr = [1,2]; // compiles, should it? int a = __traits(getMember, arr, "front"); // compiles (called popFront), should it? __traits(getMember,