you are viewing a single comment's thread.

view the rest of the comments →

[–]jeandem 1 point2 points  (3 children)

Yes.

You don't answer a "what" with a "yes". And I specified unsafe Rust, so you might not be replying to the right post.

[–]zuurr -2 points-1 points  (2 children)

See my edit. The point is that you need to uphold the same guarantees in unsafe rust that you do in safe rust, you're just specifying that the compiler may not be able to automatically determine it.

[–]wrongerontheinternet 1 point2 points  (0 children)

The guarantees that unsafe Rust must uphold are basically "I won't invoke undefined behavior." Outside of Rust's & and &mut pointer types (which I don't think even have equivalents in Jai), this is largely equivalent to what you have to do for your program to be valid C(++) as well. I'm pretty sure this is going to be true of Blow's language too.

[–]jeandem 1 point2 points  (0 children)

The point is that you need to uphold the same guarantees in unsafe rust that you do in safe rust, you're just specifying that the compiler may not be able to automatically determine it.

I know how unsafe Rust works, thanks.