Tell us your DIP1000 woes – oceandrift/http

Elias Batek desisma at heidel.beer
Mon Aug 26 00:25:22 UTC 2024


On Sunday, 25 August 2024 at 13:10:22 UTC, Mike Parker wrote:
> As an example of the sort of thing we're looking for, someone 
> in the meeting brought up the problems encountered with trying 
> to add DIP1000 support to vibe.d.

My first attempt at adding DIP1000-compatibility to 
oceandrift/http was a disaster. An hour or two of attribute 
tuning in a whack-a-mole fashion during which I was asking myself 
why I had to do this manually as I was mostly just making the 
changes suggested by the compiler. It all had an end when I ran 
into an presumably `return ref return scope` case; something that 
isn’t doable in D.

The second attempt was a bit more successful. I’ve committed a 
scarily big number of patches to a feature branch, pushed it to 
GitHub and let it be: 
<https://github.com/oceandrift/http/commit/996b743f1a7b5f4799dcde802971bfeb5a675cf1>

My third attempt was more pragmatic and meant “not doing anything 
that would make me bother with DIP1000’s scope gulasch myself”. I 
was quite happy with the end result.


More information about the Digitalmars-d mailing list