This is great! I would really love to know more about that thing about reference types that can be allocated on the stack. Is this predictable to the developer, so the dev can know exactly when a reference object will or will not be stored on the stack?
If you would like this to be deterministic it is best to just use structs. Struct handling is optimized in .NET's compiler really well, so if it's something you care about - there are already excellent tools to do so.
@@neonmidnight6264 Yes, I agree. But if it was possible to know if, for example, a local `StringBuilder` or a `string` in a specific function would get stored in the stack would be really cool.
This is great! I would really love to know more about that thing about reference types that can be allocated on the stack. Is this predictable to the developer, so the dev can know exactly when a reference object will or will not be stored on the stack?
If you would like this to be deterministic it is best to just use structs. Struct handling is optimized in .NET's compiler really well, so if it's something you care about - there are already excellent tools to do so.
@@neonmidnight6264 Yes, I agree. But if it was possible to know if, for example, a local `StringBuilder` or a `string` in a specific function would get stored in the stack would be really cool.
very good work