The only const in life is to const all the things.
can someone explain please?
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.
you mean let
.
and then letting Hindley-Milner do the rest
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