Const everything by default
If you need to mutate it, you don't, you need to refactor.
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.
Const everything by default
If you need to mutate it, you don't, you need to refactor.
Dogmatic statements like this lead to bad, messy code. I'm a firm believer that you should use whatever style fits the problem most.
Although I agree most code would be better if people followed this dogma, sometimes mutability is just more clean/idiomatic/efficient/...
Define your terms before relying on platitudes. Mutability isn't cleaner if we want composition, particularly in the face of concurrency. Being idiomatic isn't good or bad, but patterned; not all patterns are universally desirable. The only one which stands up to scrutiny is efficiency, which leads to the cult of performance-at-all-costs if one is not thoughtful.
Scala
user unite! There are dozens of us, dozens!
Scala? Can we reimplement it in Rust?
But does it do everything in anonymous functions and lambdas?
It can
can someone explain please?
The only const in life is to const all the things.
I oscillate between using more functional paradigms and more object-oriented ones. is that normal?
I use a linter BTW(TypeScript) if that is a useful info.
Avoid shared mutable state like the plague in any paradigm and you'll be fine
state management crying in the corner
Functional state management is fine
Needs more monads
you mean let
.
and then letting Hindley-Milner do the rest
let there = "light"