• Faresh@lemmy.ml
    ·
    edit-2
    9 months ago

    I tried Rust and found it to be fun (I generally think how I would solve a problem in C and then try to make my rust program follow the same exact logic without any additional overhead, trying to not use unsafe rust as much as possible, which I find to be fun).

    Unfortunately, I noticed that compile times are noticeable on even very simple programs (on the scale of seconds) on my machine, which I find problematic, because that means that complex programs written in rust will probably take an eternity to compile. (I haven't actually tried compiling any such software yet, though) I wonder what parts of the compilation process are the biggest factor in compile times, and if one could theoretically do away with it and still have a memory safe language.

    What I'm about to say may be very influenced by my love for Scheme, but I feel like Rust is a very complex language, and I find unlikely that any alternative implementation will ever be made because of that (or it will be done but at the cost of massive amount of effort from various people). I think diversity of implementations, extensibility and simplicity are important in a language.

    Am I misguided, or acting too much on my first impressions? And what other memory safe systems programming languages (so languages that don't rely on a garbage collector) are out there besides Rust?

    • Zezzy [she/her]
      ·
      9 months ago

      Rust is very complex, in part due to the obsession with zero cost abstraction that leads to caring about lots of edge cases like NonZero types. But at least when I've worked with it, a lot of that you can just ignore and write straight forward code, and it'll still likely be very performant. Although the Rust sort of philosophy vibes with me better, so not all might find that so forgiving.

      I did quit using Rust due to its compile times though. Even using dependencies that would advertise fast building like Bevy quickly started taking more than a minute to build (not from scratch, just making one line changes). And during that minute I'd get bored and do something else, and my productivity plummeted.