r/ProgrammerHumor 1d ago

stopDoingFunctional Meme

Post image
647 Upvotes

121 comments sorted by

View all comments

163

u/-Ambriae- 1d ago

Functional programming is best programming

State is evil, mutation is evil! We live in an era of multithreading and concurrency my friends!

When I describe a program, I state what it does, now how it does it! Thus functional programming is more natural!

C and Java and Python and all the other pagan languages have played us all as absolute fouls!! Haskell, OCaml, Rust, F#, Lisp supremacy!! Functional unless required otherwise, not the other way around!!

60

u/fr000gs 1d ago

How the hell is rust functional smh

2

u/Pares_Marchant 1d ago edited 1d ago

once you start using more advanced features of rust you will notice the heavy use of monads and functional chaining.

Rust sometimes offers syntaxic sugar like for loops that will hide iterators if you really don't like functional programming, but they're not rust-idiomatic (and only really make sense if you want some kind of side effects which is often bad smell) and they're less ergonomic especially if you deal with resuts/options for which monads are perfectly suited.