Earlier quoted context omitted.
Rust does have the same Memory Ordering idea (minus the ill-fated "Consume" ordering) but provides richer tools for a modern world than C does. The C standard library provides nothing to actually do concurrency, such as making more threads, nor to synchronize them, such as with a mutex whereas of course Rust provides std::thread::spawn and std::sync::Mutex In C this is a platform specific problem, for Unix systems yo…
The C standard library has had since C11 https://www.cppreference.com/c/thread and there are now a nonzero number of systems that support it! (glibc, musl, maybe others?)
The case against a C alternative (2022)
81–84 of 84 posts
Re: The case against a C alternative (2022)
#82Why are we using C anyhow? I suggest it's mainly because of established codebases although the fact that it has very few dependencies makes it attractive for systems programming perhaps and low-level. In the case of established codebases the issue is that we don't want to rewrite them because they're huge and not very well designed usually. There are no unit tests or not many and we cannot break ABI compatibility and…
> Why are we using C anyhow? Because "cc prog.c; ./a.out" offers you the most direct way to interact with your system. Because "man 2 mmap" documents a C API. Because "nm" lists your functions and global variables with the exact same names as the C program. The relative "lack of features" in comparison to its "better" alternatives is what makes it preferable. It lets you concentrate on the inherent complexity of the…
Except for anything more complex than a hello world program, it needs to be something like
cc -Wall -Wextra -Werror -O3 -lm -lfoo -lbar -fsanitize -fno-nasal-demons -o prog prog.c src/one.c src/two.c src/three.c src/four.c src/subdir/something.cRe: The case against a C alternative (2022)
#83Earlier quoted context omitted.
> C has a high level assembly language at its roots People who say this know neither C nor assembly.
People who comment like this don't know what they're talking about. C was literally invented to be a portable alternative to assembly.
Re: The case against a C alternative (2022)
#84To me the case against a C alternative is simple. C is like Math. It is the fundamental high level language. There can be no alternative.. Rust made the mistake of thinking it can be low level AND safe. It tried to have the cake and eat it too. That will be its downfall.
Thank you I needed a reason to get out of bed this morning, and rolling on the floor laughing was by far the best!
By lame, I don't mean in a bad way. I mean, it is pretty harmless or non-offensive. I am amused by the fact that you were afraid to say it in your regular id..