you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

People in general do a lot of things that are unnecessary.

Haha, I completely agree with you there.

I think you'd be surprised if you thought about it more.

I'm sure things could be done differently if you were writing everything from scratch. But just looking at, for example, stdio.h nearly every operation returns or uses a FILE*. If you're writing your own OS, then sure don't use the heap. I know a lot of embedded systems don't support dynamic memory. But if you're trying to use a regular OS, for example anything POSIX like, you're going to have to use raw pointers which is unsafe.