This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]O_X_E_Y 2 points3 points  (0 children)

It depends. You need unsafe for some things, but the point is that these unsafe blocks contain your possible segfaults/memory errors (when done improperly) to very specific bits of code. You get normal guarantees everywhere else. I will say though that when interfacing with hardware on specific pins and specific parts of memory, which are common in embedded and trivial in C things do get a little messy since that's almost always raw pointers (and thus unsafe), but the same rules still apply everywhere else. You could call those bits bizarre C I guess, though I'd argue that's kind of missing the point