Rant of the day

Paul Backus snarwin at gmail.com
Tue Jan 26 17:22:10 UTC 2021


On Tuesday, 26 January 2021 at 17:06:41 UTC, Rumbu wrote:
> I took the example from an unittest, assuming that people 
> writing phobos libs are way smarter than me :)
>
>
> https://github.com/dlang/phobos/blob/fb7bfb2ba5a581cafb9e85ced8f8d67aab35f412/std/mmfile.d#L673

Phobos code varies a lot in terms of quality and best-practice 
adherence. This unit test in particular was written 14 years ago 
[1], and has not meaningfully changed since then, except to 
replace the deprecated `delete` keyword with `destroy` + 
`GC.free`. [2] It is probably safe to assume that it would be 
different if it were written from scratch today.

[1] 
https://github.com/dlang/phobos/commit/6b069176ba798e3652a1ec5b04c0deea0f4f861f
[2] 
https://github.com/dlang/phobos/commit/9d8cb9fda2013d9cb69e67a3a726067f78875346


More information about the Digitalmars-d mailing list