• 0 Posts
  • 296 Comments
Joined 2 years ago
cake
Cake day: June 16th, 2023

help-circle














  • incorrect behavior that doesn’t even have the courtesy to throw an actual error.

    To be fair, this can be said of C. A C executable only really forces a crash out when you royally screw up beyond the bounds of your memory. Otherwise functions just return a negative value and calling code that never bothers to check just keep on going.

    Golang is similar, slightly mitigated that if you are assigning any return value from a function, you must also explicitly receive an error and you know full well that you are being lazy if you don’t handle it. Well unless you use a panic/recover scheme but golang community will skewer you alive for casually suggesting that and certainly third party libraries aren’t going to do it that way.


  • Could I write a compiler in C that does this check on a piece of Rust code?

    Well yes, but that code has to be written in Rust. The human has to follow rules to give the compiler a chance to check things.

    C is so simplictic, that if I can write a piece of functionality in C, I must understand its inner workings fully. Not just how to use the feature, but how the feature works under the hood.

    I don’t think that’s particularly more true of C than Rust or even Golang. In C you are frequently making function calls anyway for the real fun stuff. If you ever compile a “simplistic” chunk of C code that you think is obvious how it would compile to assembly and you open up the assembly output, you are likely to be very surprised with what the compiler chose to do. I’ve seen some professional C developers that never actually had a reason to fully understand how the stack works, since C abstracts that away and the implications of the stack don’t matter until you exceed some limitations.



  • Unfortunately, the ecosystem around github has evolved so that most folks centralize their testing and deployment code into being executed on github infrastructure. Frankly a perversion of the decentralized design of git.

    Fortunately for my team, it doesn’t matter because our process requires stuff that can’t be done from github infrastructure anyway, so we have kept the automatic testing and deployment on premise even as github is the ‘canonical’ place for the code to live.