• ZILtoid1991@lemmy.world
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    2 days ago

    Would be better at illustrating Rust’s cultiness if it were instead “Rust is not FP, you can opt out of it, and const by default is just good practice”.

    • Traister101@lemmy.today
      link
      fedilink
      arrow-up
      25
      ·
      1 day ago

      I mean should const not be the default? I do want to mutate objects sometimes but usually I just need a view of it’s state and not write access. It also makes mutable data a lot more obvious if whoever wrote the code your reading wasn’t putting const on stuff they should have been. Seems like something all languages with const semantics should have done