James Sinclair
jrsinclair.com · Personal blog · on HN since 2016
James Sinclair writes about JavaScript and functional programming, including monads, function composition, algebraic data types, and array reduce.
What HN saysHN commenters call his JavaScript and functional programming essays great, praise his typography, and recommend his book for functional-curious JS developers.
48HN people shared it
13linked it in comments
78stories submitted
2.5Kstory points
5 months agolast shared
2016people per year2026
Most-shared posts
- 1Elegant Error Handling with the JavaScript “Either” Monad6 people · 182 points · first shared 2019 · 235 comments on HN
- 2The Marvellously Mysterious JavaScript Maybe Monad6 people · 14 points · first shared 2016 · discussion on HN
- 3Function Composition in JavaScript5 people · 10 points · first shared 2022 · 1 comments on HN
- 4Algebraic Data Types: Things I wish someone had explained about FP4 people · 334 points · first shared 2019 · 112 comments on HN
- 5How to use array reduce for more than just numbers4 people · 139 points · first shared 2019 · 103 comments on HN
- 6Write your own arbitrary-precision JavaScript math library4 people · 69 points · first shared 2020 · 30 comments on HN
- 7Rethinking the JavaScript Ternary Operator4 people · 14 points · first shared 2021 · discussion on HN
- 8Things I wish someone had explained about functional programming4 people · 9 points · first shared 2019 · discussion on HN
- 9React, Redux and JavaScript Architecture3 people · 12 points · first shared 2018 · 2 comments on HN
- 10How to Compose JavaScript Functions That Take Multiple Parameters3 people · 7 points · first shared 2024 · 1 comments on HN
- 11Homepage3 people · first shared 2021
- 12What’s so great about functional programming anyway?2 people · 402 points · first shared 2022 · 567 comments on HN
- 13Algebraic Structures: Things I wish someone had explained about FP2 people · 357 points · first shared 2019 · 93 comments on HN
- 14Why would anyone need JavaScript generator functions?2 people · 250 points · first shared 2022 · 177 comments on HN
- 15How to deal with dirty side effects in your pure functional JavaScript2 people · 144 points · first shared 2018 · 36 comments on HN
What HN people wrote when they linked it
claytn · 2022-02-07
https://jrsinclair.com/ has amazing JS & functional programming essays.
bern4444 · 2021-02-16
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/
fabianholzer · 2026-06-12
I think the website of James Sinclair has some great typographical choices, see the colophon for details: https://jrsinclair.com/about/
joshfarrant · 2025-08-20
The author has also written a book which I’ve read a couple of times and enjoyed.
A Skeptic’s Guide To Functional Programming With JavaScript
https://jrsinclair.com/skeptics-guide
I’d recommend it for functional-curious JS devs like myself.
accrual · 2025-07-04
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-name…
kingkongjaffa · 2024-08-05
I use the term “active” pretty loosely but:
Andy is great https://notes.andymatuschak.org
Sinclair is very interesting for applying functional programming to JavaScript/Typescript
https://jrsinclair.com/web-development/
Pr0ject217 · 2022-02-07
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…
onetom · 2022-11-16
omg, so much negativity here...
you should read the previous articles from the author, eg.
https://jrsinclair.com/articles/2022/javascript-function-composition-w…
then
https://jrsinclair.com/articles/2022/what-if-the-team-hates-my-functio…
it would address some of the concerns and critiques ppl had on this topic here.
zanellato19 · 2022-10-18
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-…
[1]https://en.wikipedia.org/wiki/Tagged_union
[2]https://en.wikipedia.org/wiki/Product_type
sedeki · 2019-11-04
You might be interested to see https://jrsinclair.com/articles/2019/what-i-wish-someone-had-explained… where he puts those things under the header "Wrong Assumptions".
netcraft · 2019-06-20
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-javascrip…