The pull request of the day: 3998

2014-10-07 Thread eles via Digitalmars-d

Hello everybody,

 All D contributors are invited to have a look at this pull 
request. It is fairly important for the D language, as it 
implements the multiple alias this.


 The pull request number: 333998

https://github.com/D-Programming-Language/dmd/pull/3998

 Please focus attention on it today (well, the next 24 hours, it 
depends when your day starts).


 Let's bring'it to a state of: to be merged or to be rejected.

 Many thanks.


Re: The pull request of the day: 3998

2014-10-07 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 07, 2014 at 03:31:51PM +, eles via Digitalmars-d wrote:
 Hello everybody,
 
 All D contributors are invited to have a look at this pull request. It
 is fairly important for the D language, as it implements the multiple
 alias this.
[...]

PR of the *day*?? More like PR of the *year*. I've been waiting for
multiple alias this for a looong time, ever since I read about it in
TDPL.


T

-- 
People tell me that I'm paranoid, but they're just out to get me.


Re: The pull request of the day: 3998

2014-10-07 Thread Jonathan via Digitalmars-d
What are some common uses for multiple aliasing? I understand 
the feature, but curious where it would be commonly employed.


To me, this allows structs to have something like inheritance. 
You add a property for another struct that acts like an interface 
and alias that struct to the current one. Thoughts?


Re: The pull request of the day: 3998

2014-10-07 Thread ketmar via Digitalmars-d
On Tue, 07 Oct 2014 17:36:22 +
Jonathan via Digitalmars-d digitalmars-d@puremagic.com wrote:

 What are some common uses for multiple aliasing? I understand 
 the feature, but curious where it would be commonly employed.
it was already discussed in this NG.


signature.asc
Description: PGP signature


Re: The pull request of the day: 3998

2014-10-07 Thread Dicebot via Digitalmars-d

On Tuesday, 7 October 2014 at 17:36:24 UTC, Jonathan wrote:
What are some common uses for multiple aliasing? I understand 
the feature, but curious where it would be commonly employed.


To me, this allows structs to have something like inheritance. 
You add a property for another struct that acts like an 
interface and alias that struct to the current one. Thoughts?


Multiple inheritance of implementation for structs + implicit 
casting in one basket


Re: The pull request of the day: 3998

2014-10-07 Thread H. S. Teoh via Digitalmars-d
On Tue, Oct 07, 2014 at 05:58:40PM +, Dicebot via Digitalmars-d wrote:
 On Tuesday, 7 October 2014 at 17:36:24 UTC, Jonathan wrote:
 What are some common uses for multiple aliasing? I understand the
 feature, but curious where it would be commonly employed.
 
 To me, this allows structs to have something like inheritance. You
 add a property for another struct that acts like an interface and
 alias that struct to the current one. Thoughts?
 
 Multiple inheritance of implementation for structs + implicit casting
 in one basket

Also, transparent proxying of heterogenous interfaces. TDPL contains an
example (or two) of this.


T

-- 
Without geometry, life would be pointless. -- VS


Re: The pull request of the day: 3998

2014-10-07 Thread monarch_dodra via Digitalmars-d

On Tuesday, 7 October 2014 at 17:58:41 UTC, Dicebot wrote:

On Tuesday, 7 October 2014 at 17:36:24 UTC, Jonathan wrote:
What are some common uses for multiple aliasing? I 
understand the feature, but curious where it would be commonly 
employed.


To me, this allows structs to have something like inheritance. 
You add a property for another struct that acts like an 
interface and alias that struct to the current one. Thoughts?


Multiple inheritance of implementation for structs + implicit 
casting in one basket


I wish that's what we used it for. More often than not, it's used 
to simulate implicit casting, sometimes with catastrophic results 
in generic code...