std.v2 builder pattern replacement

ryuukk_ ryuukk.dev at gmail.com
Fri Jul 22 21:00:49 UTC 2022


I feel like you are over complicating and over engineering it, 
and builder pattern is overrated imo

If we had (designated inits everywhere) 
https://forum.dlang.org/thread/bcfhuxjqppthigqppyid@forum.dlang.org

We could simply use the struct, with defaults, and that is it, 
compiler will optimize everything anyways, you got your better 
builder

I personally never been a fan of using templates for the sake of 
using templates when the simple solution is at our hands, it 
makes the code harder to read, harder to write and it adds up to 
making your program slow to compile

https://twitter.com/flohofwoe/status/1068589642767900672




More information about the Digitalmars-d mailing list