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

The main motivation to use unsafe is p/invoke.

Without unsafe, zero init is not needed.



> The main motivation to use unsafe is p/invoke.

This is opposite to the way unsafe (either syntax or known unsafe APIs) is used today.


Explicit use of unsafe is used for things like avoiding allocation, sure.

All use of p/invoke is also unsafe though, even if the keyword isn’t used. And it’s much more common to wrap a C library than to write a buffer pool.




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

Search: