Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> Okay, I see where you are coming from. This is a common ask, but it works against the principles that make generational GCs performant.

In my comment I already suggested a context where GC can be turned off. I said: "It would be better if the GC can be turned off with a switch and just add a delete operator to manually free memory."



And that'd totally break down as soon as some underlying class does something you didn't expect. C++ RAII patterns and Rust's ownership systems are required for a very good reason (that the GC sidesteps but also makes all code dependent of), the NVec further up in the thread works because it's an explicit abstraction.


Use the stuff from Marshal and OS interop then, there are even malloc/free variants.

Also there is C++ for that, if the goal is to use C# as C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: