std.v2 builder pattern replacement

ryuukk_ ryuukk.dev at gmail.com
Sat Jul 23 13:50:54 UTC 2022


On Friday, 22 July 2022 at 23:19:53 UTC, monkyyy wrote:
> On Friday, 22 July 2022 at 21:00:49 UTC, ryuukk_ wrote:
>> I feel like you are over complicating and over engineering it, 
>> and builder pattern is overrated imo
>> to making your program slow to compile
>
> Fundmentally its ufcs-able with statement
>
> And this isnt going to be a slow template

It's stacks up, then it becomes a problem as you watch your build 
speed tank as you import things from `std`, wich is already in a 
bad spot imo


I personally think the `std` should only focus on 4 core APIs

- memory (allocators)

- containers (datastructures)

- i/o (networking, event loop, database driver)

- filesystem (files/path)

Anything else is maintenance burden

When you pick up a language and look at using the `std` you don't 
search for build pattern templates, you check if it has 
networking stuff to write your app, and that's where Phobos is 
lacking and failing behind

Builder pattern is local to your program

That is why all these sumtype/nullable etc should not be in the 
std and should be builtins  instead



More information about the Digitalmars-d mailing list