B

Brian McKenna

brianmckenna.org · Personal blog · on HN since 2010

Brian McKenna writes about functional programming, type systems, category theory, and Scala and JavaScript tooling.

What HN saysCommenters cite his posts as clear explanations of row polymorphism, promises and category theory, and call his type annotation post a great read.
32HN people shared it
8linked it in comments
35stories submitted
518story points
1 year agolast shared
2010people per year2026

Most-shared posts

  1. 1
    How to stop functional programming
    4 people · 339 points · first shared 2016 · 122 comments on HN
  2. 2
    Row Polymorphism Isn't Subtyping
    4 people · 5 points · first shared 2013 · discussion on HN
  3. 3
    Odd Odd Even Proof in Agda
    3 people · 42 points · first shared 2013 · 2 comments on HN
  4. 4
    Category Theory for Promises/A+
    3 people · 7 points · first shared 2013 · 1 comments on HN
  5. 5
    Polymorphic Programming
    3 people · 2 points · first shared 2018 · discussion on HN
  6. 6
    Read-only Guest tmux Sessions
    2 people · 4 points · first shared 2025 · discussion on HN
  7. 7
    Architecture diagrams should be code
    2 people · 3 points · first shared 2023 · discussion on HN
  8. 8
    Types in JavaScript
    2 people · 2 points · first shared 2012 · discussion on HN
  9. 9
    Type annotation cofree
    2 people · first shared 2017
  10. 10
    Escaping Callback Hell with ClojureScript macros
    1 people · 53 points · first shared 2011 · 4 comments on HN
  11. 11
    S-expression Compiler in Scala
    1 people · 25 points · first shared 2011 · 5 comments on HN
  12. 12
    WebGL for node.js
    1 people · 6 points · first shared 2010 · discussion on HN
  13. 13
    Haskell on Heroku
    1 people · 5 points · first shared 2012 · discussion on HN
  14. 14
  15. 15
    Tool Subsumption and Silver Bullets
    1 people · 3 points · first shared 2017 · discussion on HN

What HN people wrote when they linked it

efnx · 2025-03-18
From the abstract it sounds a bit like https://brianmckenna.org/blog/type_annotation_cofree, which is a great read.
pufuwozu · 2011-05-04
I wrote a small tutorial on manually setting up Android with Scala: http://brianmckenna.org/blog/minimalist_android_scala_env Enabling ProGuard is done by adding the following to build.xml: <target name="-debug-obfuscation-check"> <property name="proguard.enabled" value="true" /> <path id="out.dex.jar.input.ref" /> </target> Also add "proguard.config=proguard.cfg" to default.properties and "-dontwarn" to proguard.cfg.
BalinKing · 2018-01-12
I read about isomorf yesterday... it might be kinda like what you're looking for? Possibly relevant blog post from Brian McKenna, too: https://brianmckenna.org/blog/polymorphic_programming [1] https://isomorf.io/
coolsunglasses · 2017-04-15
>2. Tail recursion doesn't really make much of a difference for walking trees, which is recursive, but (mostly) not tail recursive. Non-strictness helps here more than TCO in a strict language. >4. ADTs can be good or bad for describing ASTs. Once you enrich ASTs with semantics shared by all variants (such as source coordinates), inheritance can become a better fit than ADTs. Since this article was written we have better ways of augmenting/annotating ASTs. There's a lot of this out there, but here's one example: https://brianmckenna.org/blog/type_annotation_cofree There are other alternatives that are like inheritance but with better reasoning properties as well. Finally tagless comes to mind. >I also generally find it better to explicitly annotate functions with types. This Haskeller whole-heartedly agrees for all the reasons stated.
juliangamble · 2013-12-15
If you're interested in Agda Proofs - this is a well written post by Brian McKenna demonstrating that the sum of two odd numbers is always even. http://brianmckenna.org/blog/plus_equals_even_take_2
splintercell · 2017-09-19
With all due respect, I don't think you understand the purpose of currying and partial application. In your defense, the article merely explains what currying is, but does not explain why you need it. For instance while writing functional Javascript code, I never curry my methods, instead I use helper methods from functional libraries such as lodash or Ramda to curry. Where currying is useful is in cases like this: ```javascript //Definitions const filterUsers = (fieldName, value, users) => //Implementation const sortUsersBy = (fieldName, users) => //Implementation const takeUsers = (count, users) => //Implementation //Without currying UserService .getUsers() .then(users => filterUsers('active', true, users)) .then(users => sortUsersBy('age', users)) .then(users => takeUsers(3, users)); //If these methods were curried UserService .getUsers() .then(filterUsers('active', true)) .then(sortUsersBy('age')) .then(takeUsers(3)); ``` Here is a video which explains proper uses of currying (and does it very well) [1]. Here is another article if your coworker start using functional programming and you want to stop them [2]. 1. https://www.youtube.com/watch?v=m3svKOdZijA 2. https://brianmckenna.org/blog/howtostopfp

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