|
|
|
|
|
by facturi
687 days ago
|
|
That proposal doesn't mention how the union struct handles tearing under concurrent modification. Tearing can cause memory safety issue. Variant A can have an integer field and variant B can have a reference field in the same offset. Tearing can cause it to treat an integer as reference. |
|
At the point where you have more than 5 cases, the GC overhead starts to get shrink in comparison to the calling convention and copying overhead anyway.