Open PathogenDavid opened 3 years ago
It's somehow not mentioned above, but parameterless constructors are coming to C# 10 so that solves the main reason I hadn't actually done this yet. Julien Couvreur confirmed they should land in 2022p3: https://github.com/dotnet/roslyn/pull/54359#issuecomment-868837007
Right now Biohazrd emits constructors and destructors as normal instance methods, they both act as if they would for placement new.
This leads to somewhat clunky usage for allocating objects from C#. For example:
Will generate something like:
"Proper" usage of this type in a stack-allocated context looks like this:
Ideally we'd like it to be able to look like this:
Other things we should ideally support:
Other things to ponder: