[Issue 18100] crt_constructor not allow to init immutable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 20 04:14:28 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=18100

--- Comment #3 from changlon <changlon at gmail.com> ---
Hi, Steven Schveighoffer 

To allow set immutable will open the door for pure function and tail recursion
optimization , and it is not safe to cast immutable to mutable and set value.

This is why static share this is better then pragma(crt_con-/destructor).


Since better D is target for high performance low level code, we should allow
set immutable on crt_constructor, or drop crt_constructor and support static
share this.

--


More information about the Digitalmars-d-bugs mailing list