Is it time for D 3.0?

Kaitlyn Emmons katemmons0 at gmail.com
Wed Apr 1 07:13:53 UTC 2020


On Friday, 27 March 2020 at 17:32:44 UTC, H. S. Teoh wrote:
> On Fri, Mar 27, 2020 at 11:56:40AM -0400, Steven Schveighoffer 
> via Digitalmars-d wrote:
>> There have been a lot of this pattern happening:
>> 
>> 1. We need to add feature X, to fix problem Y.
>> 2. This will break ALL CODE IN EXISTENCE
>> 3. OK, cancel the fix, we'll just live with it.
>> 
>> Having a new branch of the compiler will provide a way to keep 
>> D2 development alive while giving a playground to add new 
>> mechanisms, fix long-existing design issues, and provide an 
>> opt-in for code breakage.
>
> What about supporting multiple versions of the language 
> simultaneously, using some kind of version directive at the top 
> of each file?  It will mean more work to develop and maintain 
> the compiler, but the benefit is that *no* code will break, and 
> users can migrate old code incrementally and at their leisure 
> by bumping the version directive on a file and fixing any 
> subsequent errors.
>
> As Andrei said once, one solution to the problem of not 
> breaking old code while improving new code is additive 
> enhancements rather than replacing old things outright.  If 
> there's a breaking language change, maybe there's a way to keep 
> the old behaviour for old code while changing it for new code. 
> Versioned source files is one way to do this, albeit at the 
> cost of greater complexity in the compiler.
>
>
>> Some issues I can think of:
>> 
>> 1. The safe by default debate
>> 2. pure by default
>> 3. nothrow by default
>> 4. String interpolation DIP
>> 5. auto-decoding
>> 6. range.save
>> 7. virtual by default
>> 8. ProtoObject
>
> Yeah, pretty much all of these items would be nice to have in 
> my book.
>
>
> [...]
>> The biggest drawback is that we aren't a huge language, with 
>> lots of manpower to keep x branches going at once.
>
> Yeah, forking the compiler now may have major unforeseen 
> consequences.
>
> Supporting multiple versions of the language simultaneously 
> will also put a drain on our resources, and there will be 
> tricky issues about how to interoperate code written in 
> different versions of D, but at least it still keeps it all in 
> one place.
>
>
>> I just wanted to throw it out as a discussion point. We spend 
>> an awful lot of newsgroup server bytes debating things that to 
>> me seem obvious, but have legitimate downsides for not 
>> breaking them in a "stable" language.
> [...]
>
> Yes, we're gradually becoming everything we hated about C++. 
> Perhaps it's not as simple to do better, as we once thought! ;-)
>
>
> T

+1 on this comment..
If i could vote for one feature to add that would be HELLA 
breaking but would be AMAZING at same time it is versioning built 
into the compiler, preferable GIT because that is what dub uses..

also if we are voting for new names i vote DIALECTIC! A dialectic 
is what the ancients uses for debate.. hagel used it for 
dialectic analysis to study things like self vs other, and marx 
used it for economic analysis, worker vs owner. Often in 
philosophy classes the dialectic is taught as synonym for debate, 
that is WRONG... a dialectic is TWO end points with tension 
between the two. LIKE TWO VERSIONS OF A COMPILER!!! OR TWO 
VERSIONS OF A REPOSITORY .. or two nodes in a graph...

The tension this language is facing is the fact that old versions 
of the language can not communicate with new versions of the 
language.. they can not interact with each other!

The dialectic is often used as a synonym for debate.. if the past 
version of the compiler and the future versions of the compiler 
could communicate.. share information.. have a debate.. ideas 
could flow up and down the stack..

If i could vote for one feature that would be hella breaking but 
lowkey amazing it would be adding versioning system to the 
compiler.. where child and parent compilers talked back and forth 
to compile the code..


More information about the Digitalmars-d mailing list