💾 Archived View for gemini.sh0.xyz › misc › unpublished.gmi captured on 2023-07-22 at 16:41:08. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-01-29)
-=-=-=-=-=-=-
Oddly, I had a very similar conversation the other day on matrix, about what makes a language functional and what someone who has never programmed in FP should expect. There has been a huge push for modern, evergreen languages to start adding in "FP style" into their design and pushing it as idiomatic. You'd think this is is a good idea. A lot of the benefits of FP is terse, powerful functionality.
What we see in most languages are extremely superficial views of FP. Maps and Filters, Optional types, etc. What it shows is a lack of understanding just why FP works well.
Don't use global variables
This is good for all paradigms. Global variables means you're ignoring scope and introducing unmanageable ownership of data. Multi-threading is just a pain when data is global.
In no language should you use Globals unless its necessarily. And its almost never necessary.
Treat function parameters as immutable
For most of us, there isn't a hige benefit on