Multiple Inhertiance?

via Digitalmars-d digitalmars-d at puremagic.com
Thu Nov 6 01:34:02 PST 2014


On Thursday, 6 November 2014 at 09:03:02 UTC, bearophile wrote:
> Think of C++17/D2 as testbed entities that contain most 
> features, to test what works and what doesn't work, to create 
> successive languages that contain only the useful features :-)

:-) Yes, I view D2 as an experiment. And I view your and other's 
contributions in the forums as very useful for getting more 
nuances when it comes to various features for a statically 
compiled language.

Anyway when doing language design one should strive to:

1. Understand how it works in other languages that have 
generalized the concept.

2. Figure out if you are actually providing N different ways of 
expressing the same concept.

(3. Stop claiming innovation without doing proper research of the 
field.)

The problem with this view of adding many features is that they 
work against each other if they are not designed in tandem (as a 
whole). This is seen quite clearly in C++.

> (I still don't have desire for multiple alias this at this 
> moment. I'd like tuple unpacking, more value range analysis, 
> something to enforce preconditions at compile-time, a built-in 
> yield/yieldAll, and little else).

Yep, language support for tuples would be valuable. It is not 
easy to add this late though, if you want them to be powerful and 
play nice with rest of the language.

I think D would benefit from focusing on compile time resolution. 
In that context alias this might make some sense, especially if 
you ripped out the class concept.



More information about the Digitalmars-d mailing list