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

  1. 1
  2. 2
    The Marvellously Mysterious JavaScript Maybe Monad
    6 people · 14 points · first shared 2016 · discussion on HN
  3. 3
    Function Composition in JavaScript
    5 people · 10 points · first shared 2022 · 1 comments on HN
  4. 4
  5. 5
    How to use array reduce for more than just numbers
    4 people · 139 points · first shared 2019 · 103 comments on HN
  6. 6
  7. 7
    Rethinking the JavaScript Ternary Operator
    4 people · 14 points · first shared 2021 · discussion on HN
  8. 8
  9. 9
    React, Redux and JavaScript Architecture
    3 people · 12 points · first shared 2018 · 2 comments on HN
  10. 10
  11. 11
    Homepage
    3 people · first shared 2021
  12. 12
    What’s so great about functional programming anyway?
    2 people · 402 points · first shared 2022 · 567 comments on HN
  13. 13
  14. 14
    Why would anyone need JavaScript generator functions?
    2 people · 250 points · first shared 2022 · 177 comments on HN
  15. 15

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…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close