More incremental process for adding new features in D

Seb seb at
Thu Sep 3 05:27:44 UTC 2020

On Wednesday, 2 September 2020 at 19:45:58 UTC, Per Nordlöw wrote:
> I wonder why we haven't taken an incremental approach to 
> newCTFE aswell. I bet there are numerous projects who could 
> benefit from it despite its lack of associative arrays and 
> exception handling.

IIRC newCTFE was never in a mergeable state (i.e. not based 
against master).
In general, the barrier for new features is rather low when they 
are introduced via a `-preview` switch (that's exactly why this 
switch was introduced) and such experimental features don't 
require a DIP or full completeness of every corner case. The PR 
does need to match with the usual guidelines (D style, new code 
covered by tests).

The problem typically is that a -preview flag might break 
existing code and there isn't a straight-forward transition via 
deprecations which is why features under -preview have a harder 
time to get activated by default.
That being said, for example, DDoc's markdown support was added 
incrementally to -preview=markdown:

and will even be activated by default with the upcoming release.

> Adding newCTFE as a -preview=new-ctfe will gather feedback on 
> bugs and performance and will motivate the developers 
> themselves in helping Stefan out in making newCTFE more 
> complete.

Didn't Stefan give up on newCTFE?

More information about the Digitalmars-d mailing list