Comment by galangalalgol
3 days ago
Swift is very slow relative to rust or c though. You can also cause seg faults in swift with a few lines. I Don't find any of these languages particularly difficult to read, so I'm not sure why this is listed as a discriminator between them.
But those segfaults will either be memory memory safe or your lines will contain “unsafe” or “unchecked” somewhere.
You can make a fully safe segfault the same way you can in go. Swapping a base reference between two child types. The data pointer and vft pointer aren't updated atomically, so a thread safety issue becomes a memory safety one.
This is no longer allowed with strict concurrency
1 reply →