News for hackers. Stuff that matters.
Re:Show HN: Crown – A flexible game engine written from scra... by imron on Thursday June 22, 2017 @11:37AM (#14612968)
> It forces heap allocation though, which is bad.

It does, and it can be, but in situations where it matters, the static create function typically returns a value from a preallocated pool of memory, so objects are all contiguous and cache friendly.

Re:Show HN: Crown – A flexible game engine written from scra... by gpderetta on Thursday June 22, 2017 @12:02PM (#14613172)
Even when using a pool allocator, you still have unnecessary indirections which is expensive. One of the benefits of C++ is the ability of being able to allocate subobjects inline with the containing object or array. By forcing indirection, allocating subobjects requires navigating a potentially deeply nested tree.
Re:Show HN: Crown – A flexible game engine written from scra... by imron on Friday June 23, 2017 @02:57AM (#14617443)
This is true, and like I said above, it's not a method I prefer to use, it's just something that is commonly seen in projects that disable exceptions in order to avoid 2 phase initialization.

There are definitely things to be aware of before adopting such a pattern, or when trying to optimize code that uses it.