251
you are viewing a single comment's thread
view the rest of the comments
[-] Boomkop3@reddthat.com 11 points 2 weeks ago* (last edited 2 weeks ago)

No mutable types? So like.. no lists? no for ... i++?

I get that there are alternative approaches, but I don't quite see why you'd want to go to that extreme with this idea? It's useful for some applications but even for a simple video game it's likely not helpful.

[-] GissaMittJobb@lemmy.ml 12 points 2 weeks ago

It's perfectly possible to work without mutability.

Is it desirable to be entirely without it? Probably not, but leaning immutable is definitely beneficial.

[-] sugar_in_your_tea@sh.itjust.works 1 points 2 weeks ago* (last edited 2 weeks ago)

Yeah, copying can totally screw you over. Mutability is fine, just make sure it's safe (e.g. what Rust does).

[-] monotremata@lemmy.ca 6 points 2 weeks ago

Pure functional programming is often like this.

[-] UndercoverUlrikHD@programming.dev 2 points 2 weeks ago

Erlang/Elixir doesn't have muteable variables/types. Appending to a list would just create a "new" lists.

this post was submitted on 23 Mar 2025
251 points (100.0% liked)

LinkedinLunatics

4294 readers
2 users here now

A place to post ridiculous posts from linkedIn.com

(Full transparency.. a mod for this sub happens to work there.. but that doesn't influence his moderation or laughter at a lot of posts.)

founded 2 years ago
MODERATORS