I have always had a great deal of respect for C, and I would like to start writing in it. However, while I am skilled in other languages, I basically don’t know any C off the top of my head.

I find that I learn better and faster by attempting projects, rather than working through a book ir taking a class. For example, to learn Perl, I am working on a basic disk image writer that’s coming along nicely.

So, what do you think might be a good idea for my first C project?

EDIT: Zig is also something I’m interested in learning. Same question, different language.

  • ShawiniganHandshake@sh.itjust.works
    link
    fedilink
    arrow-up
    16
    arrow-down
    2
    ·
    2 days ago

    As someone whose first “real” programming language was C, I recommend against writing anything new in C.

    There are plenty of C projects you could consider contributing to as a way to learn the language (and if you want a long and prosperous career, knowing C can only help you) but language design has come a long way since the 70s and something like Golang or Zig or Rust would get you many of the advantages of C with many fewer pitfalls.

        • wewbull@feddit.uk
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 day ago

          That’s more the standard library rather than the language I’d say, and the next set of changes looks more “additional” rather than “reworking” (unlike the last set).

          …but yes, it is still fluid.

    • mrmaplebar@fedia.io
      link
      fedilink
      arrow-up
      4
      ·
      2 days ago

      I’m totally with you on this.

      C is a fantastic language for people who want to develop for existing C projects. But there are very few reasons to develop new software projects in C today. As such, for anyone learning C, the best first project would probably be whatever existing C project you want to work on.

      Maybe the main exception to that is probably embedded systems stuff for microcontrollers and the like, but I don’t know enough about that space to say whether that is even still the case or whether you’d be better off with something else.

    • ExLisper@lemmy.curiana.net
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      2 days ago

      There’s still plenty of jobs using C. C has certified compilers and libraries that let you use it in projects with security regulations like automotive. Those project are not moving to Rust or Zig anytime soon. They are also safe from AI (no one will dare doing anything “agentic” in safety critical projects) and with latest investments in the defense sector in Europe I would expect them to grow in the coming years. If I could change career paths today I would definitely consider C. Rust is great but it’s really hard to find a job as a rust programmer.

      • homura1650@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        I don’t know about Europe. But the US (or at least the portion of the US federal government I deal with) has been trying to ban us from using memory unsafe languages for as long as I can remember. For us, Rust isn’t replacing C; it is replacing Ada. The only difference is that they have stopped granting exceptions for new code bases in memory unsafe languages.

        • ExLisper@lemmy.curiana.net
          link
          fedilink
          arrow-up
          1
          ·
          2 days ago

          Yes, they are trying but C still dominates in many parts of industry. After learning C I would definitely start learning Rust but right now you will have way bigger chances of finding a job with C than with Rust.

          • prettybunnys@piefed.social
            link
            fedilink
            English
            arrow-up
            2
            ·
            1 day ago

            The other side of this coin is C developers are still plentiful whereas folks who know rust are less available.

            If someone knows C and Rust experience I’m hiring them over the others.