• Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    edit-2
    3 days ago

    The old school method of learning a programming language, database, framework or whatever was to read books and take classes, do a series of exercises that teach you how to use the features, and the errors you get if you don’t do it right. Then you write code that way for like 10-15 years.

    The Information Age method is to find some sample code, copypaste into an editor and hit Compile, then paste compile errors into google and fix them until there are no more. Then hit Run and copypaste/fix runtime errors until there are no more runtime errors. Old-schoolers used to call this hacking, but now it’s called not having time to deeply learn the hot new thing because before you do you’ll have to start over with the next hot new thing.

  • diffusive@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    3 days ago

    Call me a weirdo but the more errors a compilers give me the happier (albeit a bit frustrated) I am. That stuff generally surfaces in a way or another… and I prefer at compile time 🙂

    That said I haven’t spent quality time with Rust yet… so not sure if there are a lot of nitpicks (ala go) or these are valgrind-level of “holy s*** I am so grateful to this tool” 😃

  • ExLisperA
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    3 days ago

    In my experience rust compiler simply moves the errors to earlier stage of development. With rust I write something and get bunch of errors right in the IDE. I spend some time fixing those and when all the compilation errors are gone in 99% of cases the code works and does what it’s supposed to do.

    With other languages I write some code and the compiler/interpreter says it’s all good. I then run it, get bunch of errors and have to do some debugging, move back and forth between the editor and the command line/browser/application and fix all the bugs one by one.

    So yeah, rust compiler complains a lot but it’s to make your life easier, not harder. For me working rust way is just much more pleasant. I get immediate visual clues about the errors right in the IDE. When I finally get it right and all the errors dispersal it’s like solving a small puzzle. You know you got it and it feels good. With other languages you think you got it all the time only to find another bug when you run it. Doing it this way is much more frustrating.

  • mholiv@lemmy.world
    link
    fedilink
    arrow-up
    12
    ·
    4 days ago

    Skill Issue.

    For reals though adopting a functional style of programming makes rust extremely pleasant . It’s only when people program in object oriented styles that this gets annoying.

    No loops, and no state change make rust devs happy devs.

  • Kamikaze Rusher@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    4 days ago

    This is my experience every time I return to learning rust. I’m guessing that if I used it more often than once a quarter with hobby projects I’d stop falling into the same traps.