New feature proposal: "initialization scope"

dennis luehring dl.soluz at gmx.net
Thu May 16 01:19:14 PDT 2013


Am 16.05.2013 10:09, schrieb TommiT:
> On Thursday, 16 May 2013 at 07:59:20 UTC, dennis luehring wrote:
>> doesn't that break the constness for other threads usage?
>>
>> (not in your example - but in any other using threads, const
>> globals and your proposed "initialization")
>
> I'm sorry, somehow I just don't understand the question.
>

in short: your proposal breaks const thread access safetiness

and there are 3 other solutions down here

1. static this () { }
2. 2 functions returning into consts
3. a class with init in ctor + lookup funcs in const ref

so there is not need for an "initialization" feature


More information about the Digitalmars-d mailing list