this post was submitted on 19 Jun 2025
326 points (90.5% liked)

Programmer Humor

24476 readers
91 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

Made with KolourPaint and screenshots from Kate (with the GitHub theme).

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 24 points 6 days ago* (last edited 6 days ago) (6 children)

Because sometimes that let can be replaced by other things like const. Which can be managed statically by the machine and not by my (imperfect) ability to know if it's mutated or not

[–] [email protected] 5 points 6 days ago (1 children)

I think you can do const thing = ... as constto lock down the mutation?

[–] [email protected] 4 points 5 days ago

So is let in some languages. In Rust, you have to constantly opt out from immutability with let mut, which makes writing more procedural code feel like you're fighting with the compiler, and otherwise I don't really see the rationale behind full functional coding. I only had a bug caused only once by unwanted mutation, the hardest part fixing it was to learn the proper use of my debugger tool.

load more comments (4 replies)