Isn't it about time for D3?

James Hofmann via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 10 21:18:12 PDT 2017


On Saturday, 10 June 2017 at 23:30:18 UTC, Liam McGillivray wrote:
> I realize that there are people who want to continue using D as 
> it is, but those people may continue to use D2. Putting the 
> breaking changes in a separate branch ensures that DM won't 
> lose current clients as they can just continue using D2 as they 
> are. Even after D3 is stabilized, D2 could have continued 
> support until nobody wants it.

Here is my suggestion for how to migrate into D3 well, if it were 
to be done:

First define a "Small D2". The goal of this language is to not 
really be that much smaller(it could still leave in most of the 
language, in fact), but to sweep up all the changes breaking with 
D2 into a form that's clearly less flexible while still being 
palatable for the majority of modules. It's allowed to be 
intentionally clumsy and regressive in some ways so that it can 
be forward-looking later, but not so much so that people don't 
want to write in it.

Small D2 is given the freedom to do things like regress standard 
library functions back into hardcoded compiler behaviors, to be 
more restrictive, to allow less ambiguity, and to generally 
follow with existing idioms but break the things that needed 
breaking and leave out the parts that didn't work. The new stuff 
of Small D2 would be "one-trick-pony" features that bottleneck 
what can be expressed into a "library" that is actually a 
compiler hack, or "new syntax" that is actually fake and only 
allows arbitrary expressions that are already possible in other 
ways.

Most importantly, Small D2 retains compatibility with regular 
("big") D2 modules, so codebases can be migrated into Small D2 
piecemeal, while leaving a small remainder to be migrated in a 
larger way when D3 rolls out. In essence, Small D2 allows the 
underlying formulation of D to be challenged, but it actually 
relies on regular D2 constructs internally, so iteration on 
design can go faster than if we "did it for real". And because 
Small D2 gives people a taste of new stuff, it will have some 
instant appeal: People should want to write new code in it, even 
knowing that it's a hack and less powerful.

Small D2 would be the debate platform for what the "core" of D 
is. Then, D3 is Small D2 with everything "done for real" this 
time. Small D2 code migrates forward seamlessly and can continue 
operating as if nothing happened. The rest of it is considered 
breaking.


More information about the Digitalmars-d mailing list