On Wednesday, 8 January 2020 at 07:03:26 UTC, Jonathan M Davis wrote:
you could just document that no one should ever use its init
value explicitly, and that they will have bugs if they do

You also create a static init member marked @disable:

struct S {
    @disable this();
    @disable static S init();
}

This will give sensible error messages anywhere .init is being used. Now, Phobos and other libraries might expect that .init is always working, so this could potentially be a problem.

Reply via email to