James Sinclair writes about JavaScript and functional programming, including monads, function composition, algebraic data types, and array reduce.
HN commenters call his JavaScript and functional programming essays great, praise his typography, and recommend his book for functional-curious JS developers.
I dont disagree - where things like either, maybe or result really shine is when its baked into the stdlib _and_ there is machinery built into the language to make using them easy (like pattern matching, and them being in scope by default). I have used and written several libraries trying to make them work in js/ts and while they are beneficial around my custom domain specific code, you still spend a bunch of time wrapping things coming from libraries or other code you dont have control over.
But the benefit of them over a check against null is that you can write a pipeline of functions that dont have to handle those cases and you know that its always safe to do so. This other article by the same author as the OP I think illustrates it well https://jrsinclair.com/articles/2016/marvellously-mysterious-javascript-maybe-monad/
Enums are Sum Types, which are a type of ADT[1].
Tuples are a Product Types, which are another type of ADT[2];
Sum Types are so called because when you add one to that, you add just one more possibility (It could be A,B now it can be A,B,C). Product Types, on the other hand, give out possibilities based on their Product, so if you add a new property, you multiply it (A,B can both be two things, so you have 4 possibilities, if you add C that can also be two things, then you now have 8 possibilities).
This is a good explanation: https://jrsinclair.com/articles/2019/algebraic-data-types-what-i-wish-someone-had-explained-about-functional-programming/
[1]https://en.wikipedia.org/wiki/Tagged_union
[2]https://en.wikipedia.org/wiki/Product_type
I kind of agree with your comment here and with what mlinhares responded with. There are a few engineers I enjoy following who give good, and actionable advice.
One is Scott Wvlaschin especially if you're interested in Functional Programming
Another is James Sinclair[0].
A couple other names, Ryan Florence and Michael Jackson (the dev, not the singer).
And one last one is Kent Dodds.
These are mostly people on the front end (since that's where I work). I've found content put out by all of them (articles, videos, tutorials etc) to be excellent and if not directly practical insightful.
They also all actively write software. I recommend taking a look when you have a chance. Better than uncle bob
[0]https://jrsinclair.com/
EDIT:
Paste this hacky snippet into your browser's console to save all of the links into your clipboard:
(() =>
{
let result = [...document.querySelectorAll('td a')]
.map((link) =>
link &&
!link.href.includes('ycombinator') &&
!link.href.includes('javascript:void')
? link.href
: ''
)
.filter(Boolean);
result = [...new Set(result)];
result.sort();
copy(result.join('\n\n'));
})();
Just to help, here's a compiled-list of all of the links shared here so…
Definitely, I think I wrote imprecisely when I used "humanity". I meant more like I personally wrote it, the sentence structure and grammar are mine, the mistakes are mine, and hopefully it's still clear and easy to understand.
Speaking of mixing technical text and style/prose, I feel this link from yesterday did a great job executing both (granted it is an article, not a paper):
https://jrsinclair.com/articles/2025/whats-the-difference-between-named-functions-and-arrow-functions/
omg, so much negativity here...
you should read the previous articles from the author, eg.
https://jrsinclair.com/articles/2022/javascript-function-composition-whats-the-big-deal/
then
https://jrsinclair.com/articles/2022/what-if-the-team-hates-my-functional-code/
it would address some of the concerns and critiques ppl had on this topic here.