Why can't we derive struct's? (Hansel & Gretel)
alexanderheistermann at gmail.com
Fri Dec 21 15:19:05 UTC 2018
On Friday, 21 December 2018 at 07:23:41 UTC, Manu wrote:
> On Thu., 20 Dec. 2018, 7:35 pm Walter Bright via Digitalmars-d
> < digitalmars-d at puremagic.com wrote:
>> On 12/20/2018 10:38 AM, H. S. Teoh wrote:
>> > There has been multiple attempts to implement it, but none
>> > were persistent enough to see it through to the finish line.
>> Nobody has figured out the semantics of single alias this,
>> either (when
>> with class inheritance). The bugzilla issues for it are ample
>> MI is a Hansel and Gretel feature, where it appears to be all
>> candy, but the witch inevitably appears to pop you in the oven.
>> Other Hansel and Gretel features:
>> 1. monkey patching
>> 2. macros
>> 3. implicit variable declaration
>> 4. preprocessor
> I don't think I've ever wanted multiple inheritance in D, but I
> do want implicit conversions very often, and occasionally
> multiple implicit conversions.
I want implicit conversions here as well.What I don't want is
this to be achievable via alias this, as you have no control over
how it implicit case. I rather to do it via opCast.
More information about the Digitalmars-d