Auto-decoding

Seb via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 15 15:28:04 PDT 2017


On Saturday, 15 July 2017 at 18:47:25 UTC, Joakim wrote:
> On Saturday, 15 July 2017 at 18:14:48 UTC, aberba wrote:
>> So what is the current plan? :)
>
> Andrei has talked about having a non-auto-decoding path for 
> those who know what they're doing and actively choose that 
> path, while keeping auto-decoding the default, so as not to 
> break existing code.  Jack has been submitting PRs for this, 
> but it is probably tedious work, so progress is slow and I 
> don't know how much more remains to be done:
>
> https://github.com/dlang/phobos/pulls?q=is%3Apr+auto-decoding+is%3Aclosed

The idea is that once DIP1000 has matured, more focus on compiler 
support for reference-counting will be given with the aim of 
improving the @nogc experience. One example is DIP1008 for @nogc 
exceptions [1], but another one that is important in this context 
is RCString [2]. The idea is that RCString will be a new opt-in 
string type without auto-decoding and GC.

Another idea in the game is `version(NoAutoDecode)`:

https://github.com/dlang/phobos/pull/5513

However, here's unfortunately still unclear whether that could 
result in a working solution.

[1] https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md
[2] https://github.com/dlang/phobos/pull/4878


More information about the Digitalmars-d-learn mailing list