← Back to context

Comment by kamma4434

4 days ago

I cannot help but wonder why starting a new project in C in 2025. It’s like driving a car with no seat belts. You sure you want to do that?

I moved from C++ to C and I am more productive. I also think this "no seat belts" meme is exaggerated, as there are plenty of tools and strategies to make C fairly safe to use. (it is true though that many people do not put the seat belts on).

In my experience, although many of the other programming languages do improve some things compared with C, they also make many things worse and avoid some of the benefits of C programming.

  • I can't recall anything in that sense regarding Modula-2 and Object Pascal, other than not bringing UNIX to the party.

I cannot help but wonder why I would learn a whole new language before even beginning to start a new project when I already know C. Though, generally speaking, I tend to use C++ for new projects -- usually depending on what libraries I'm using, if the lib is in C I use C and if the lib is in C++ I use C++. The current thing I'm working on is intended as a Python extension module and Python is written in C so...

And, yes, I know it's trivial to interface the Python C-API with C++ and quite often better as the 'object model' is very similar but the underlying concept I wanted to explore (guaranteed tailcalls) isn't possible in C++ from what I can tell.

This is the best question for me. Writing these codes in C language is the best way to learn the file structure of jvm/dalvik/pe. This process makes me like C language more. For me, I think it is simple and pure, which is enough.

i only write in C. if id build a car it wouldnt have seatbelts. boring, put in ejector seats! not safe? no problem for C :).

  • ejector seats in C car?

    goto eject; ...more code we are going to ignore, it could be important but nah, ignore it, what could be happen?...

    eject: up_through_the_roof();

    :D

We need people who can (and do) write in C, assembly, and all these low-level languages. Otherwise, software will just get slower and slower.

  • Rust has the same low-level memory model as C without the footguns.

    • Rust certainly does have some improvements, but I'm not 100% certain that it's the best tool for all low-level software. For example, I'm experimenting with Rust for some filesystem type code and I can't figure out how to write/read a struct to/from disk all at once. I'm brand new to Rust, so it's quite possible that it can be done and I just don't know the technique. Basically, I'm looking for something in Rust analogous to C's fread/fwrite. I know I can write out each field of the struct individually, but when the struct has many fields it means having to write a huge amount of nasty boilerplate code when in C it's a single function call (fread/fwrite).

      3 replies →

    • I love Rust but we really got to stop the link between C and Rust.

      If someone mentions C, that's not a free invite to start educating them on why they SHOULD use Rust. No one at the party is going to talk to you again that night

When debugging complex projects, the C language is more flexible and convenient to view data in memory.

It's thanks to people like you that rust is not more widely used, you actively make people avoid the rust cummunity because they will think everybody i like you!