←back to thread

218 points signa11 | 1 comments | | HN request time: 0s | source
Show context
9d ◴[] No.43681256[source]
> C doesn't try to save you from making mistakes. It has very few opinions about your code and happily assumes that you know exactly what you're doing. Freedom with responsibility.

I love C because it doesn't make my life very inconvenient to protect me from stubbing my toe in it. I hate C when I stub my toe in it.

replies(5): >>43682578 #>>43683142 #>>43683157 #>>43683835 #>>43684772 #
OCASMv2 ◴[] No.43682578[source]
No, it just makes it inconvenient to try to protect yourself from stubbing your toe in it.
replies(1): >>43683891 #
codr7 ◴[] No.43683891[source]
C doesn't make anything inconvenient, that's its major appeal. Some things are convenient by design, yes, but it's not trying to prevent you from doing anything. That's a feature.
replies(1): >>43684488 #
OCASMv2 ◴[] No.43684488[source]
> C doesn't make anything inconvenient

Other than writing memory safe code, as history has shown.

replies(1): >>43685453 #
codr7 ◴[] No.43685453[source]
Difficult, not inconvenient.

Because it allows things that are difficult, like writing your own memory allocators.

If you don't like working at that difficulty level, then C programming isn't for you. And that's fine.

replies(1): >>43686758 #
OCASMv2 ◴[] No.43686758[source]
It doesn't allow me to write my own memory allocator, it forces me to.

This line of argumentation reminds me of this:

Advertise and promote a shortcoming or a fault as a virtue.

For example, ultra-cheap single-use film cameras are advertised as "No Focusing Required." The truth is, no focusing is possible, because those cameras have cheap plastic fixed-focus lenses that won't move and can't be focused. What is a serious shortcoming for a camera — the inability to properly focus on the subject — is sold as a convenience: "You don't have to bother with focusing."

https://orangepapers.eth.limo/orange-propaganda.html#make_vi...

replies(1): >>43699790 #
1. codr7 ◴[] No.43699790[source]
No it doesn't, malloc() and free() is the default.