News for hackers. Stuff that matters.
Re:The rise of wgpu by flohofwoe on Thursday March 07, 2019 @01:02PM (#19330371)
I'm not sure if the builder pattern is better than designated initialization... AFAIK in Rust you can get something similar (fill up missing members with their default values) with ..Default::default(), like:

    &BlaDesc {
        bla: 1,
        blub: 2,
        ..Default::default()
    }
Re:The rise of wgpu by masklinn on Thursday March 07, 2019 @01:31PM (#19330684)
One annoyance of this is that you can't require fields to be explicitly provided anymore.

With the builder pattern, you can do so: require them in the builder constructor.