Why is learning C so much more generally useful than learning React? What I mean by the last point is that learning C tends to develop skills that are useful in a lot of other parts of software and tech work: if you know how to write decent C, you’ll have a much easier time of understanding PostgreSQL internals, for example, while if you’ve learned React, it’s anyone’s guess as to whether or not that’ll actually improve your HTML skills, for example.

  • trem@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    5
    ·
    11 hours ago

    if you know how to write decent C, you’ll have a much easier time of understanding PostgreSQL internals, for example, while if you’ve learned React, it’s anyone’s guess as to whether or not that’ll actually improve your HTML skills, for example.

    I mean, there’s also a much more mundane reason why C comes up more often: It doesn’t use a runtime environment, so a library written in C can be called from virtually any programming language.

    For the longest time, if you wanted to write a cross-language library, C and C++ were pretty much your only choices.
    Rust is now entering that circle and I do think, it will start showing up in lots of places, too.

    But perhaps another reason why mastering C is more educational than mastering other languages, including Rust: C hardly abstracts from how the hardware works, so you’re not just mastering C, you’re also mastering hardware.

    Other programming languages ultimately get executed on that same hardware as well, even if lots of abstraction layers are in between, so that knowledge still keeps being relevant every so often.

  • apparia@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    16
    ·
    16 hours ago

    Great article. I’ve always been of the opinion that C should be one of, if not the, first things taught to programmers. You can explain Python in terms of C, but you can’t explain C in terms of Python.

    • vanillama@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      14 hours ago

      I was taught by my teachers years ago that it was great that I wouldn’t have to pick up C thanks to higher level languages and I trusted them, and I regret it deeply. It took me years of curiosity and reading unrelated stuff to parse some stuff that would have probably taken so little time if I had simply started with C.

      • apparia@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 hours ago

        From the perspective of this thread they’re probably similarly good and “deep”. My instinct would be to err away from anything object oriented for beginners since OOP has always felt a little cultish to me and I think it’s maybe something “shallow” (at least shallower than plain C) that has a habit of masquerading as the one true “deep” way to do programming.

        C also has the practical advantage of being fucking everywhere.

        Rust

        I like Rust, but beyond the subset that is “ugly C” – using unsafe everywhere and eschewing like 90% of std – it’s definitely shallow.

      • jsnfwlr@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        14 hours ago

        Pascal was the language for teaching when I learned to code. Then Assembly X86, C, and Java. Pascal is solid.

  • jsnfwlr@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    14 hours ago

    Types… Database columns have types. C has types. JavaScript allows you to work without types. Write react in typescript instead.