C is a cool programming language where if you want to return a string from a function you have to set up an entire physical-universe human social system for adjudicating who is responsible for freeing it "In order to create a C string, you must first create civilization"
-
Show this thread
-
Replying to @mcclure111 @erincandescent
And most other languages just pretend resources are infinite...
1 reply 1 retweet 31 likes -
C pretends programmer time is infinite, who has time to manage memory, that's real work, aren't computers supposed to automate work ? just buy 2x memory (as per GC theory worst case)
1 reply 0 retweets 1 like -
Replying to @Luiz0x29A @RichFelker and
There's more to consider than a languages productivity. A GC is a show stopper if you're doing anything with hard real time constraints. And even if you're only running on embedded hardware and can safe 50% RAM, it might be a good idea depending on the circumstances.
3 replies 0 retweets 1 like -
Replying to @Gottox @Luiz0x29A and
And even if you just want to learn, C hides very few complexity. If you're know what's going on when handling strings, it might prevent some issues with other languages, too.
2 replies 0 retweets 0 likes -
Replying to @Gottox @RichFelker and
really, do you know what's going on? caching out of order execution branch prediction pipelines register renaming expeculative execution memory barriers real hardware is nothing like C v̶i̶r̶t̶u̶a̶l̶ abstract machine compilers hide a lot of things
2 replies 0 retweets 1 like -
Replying to @Luiz0x29A @Gottox and
It's a bug in the hardware if you have to be aware of any of those to write correct programs.
1 reply 0 retweets 2 likes -
Replying to @RichFelker @Gottox and
too bad if you mistakenly used undefined behavior
1 reply 0 retweets 0 likes -
Replying to @Luiz0x29A @Gottox and
Out of all your list, data races (roughly corresponding to memory barriers) is the only one vaguely relevant to UB. Everything else preserves all behavior of arbitrary userspace asm (except timing) so it necessarily preserves behavior of C.
2 replies 0 retweets 2 likes -
Replying to @RichFelker @Gottox and
sometimes cpu bugs are fixed in the compiler, the compiler is what preserves the behavior of the C language those things I said is that for those working with the compiler they should know that list of things
1 reply 0 retweets 1 like
Rich Felker Retweeted Rich Felker
Ok, that goes back to..https://twitter.com/RichFelker/status/1017497123208785921 …
Rich Felker added,
-
-
Replying to @RichFelker @Gottox and
I agree, my point was that there's a lot of hidden things, both the C language, the ISA and the CPU itself hide things from you that's why its writing in the spec "C v̶i̶r̶t̶u̶a̶l̶ abstract machine" people take it for the real thing when it's not
1 reply 0 retweets 0 likes -
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.