Open 5GameMaker opened 4 months ago
Correction: new
is a C++ feature
Since this library is extremely popular, we need to keep safety and speed as top priorities, but also code quality :)
(this is definitely real logic and not just me giving you a hard time)
It's fearless, it's concurrent, and it's repr C.
For people who want to do manual memory management, there are now
new
andfree
functions which return and acceptRef<T>
. Those functions replicate how those work in C, allowing free moving and mutating.Essentially
Ref<T>
disables borrow checker. This addresses the criticism of Rust being a difficult to use language due to borrow checker enforcing safety rules, which, as we can deduce from the amount of memory-management-related CVEs, is a hard thing for human beings to manage.