S
Soroush Khanlou
khanlou.com · Personal blog · on HN since 2012
Soroush Khanlou, an iOS developer, writes about Swift, Objective-C, app architecture and functional programming ideas like monads.
What HN saysCommenters recommend it as thoughtful and practical, and link posts on long Swift compile times and pure objects.
26HN people shared it
6linked it in comments
46stories submitted
379story points
11 months agolast shared
2012people per year2026
Most-shared posts
- 1What the Heck Is a Monad4 people · 7 points · first shared 2015 · 2 comments on HN
- 2Programmatically Generating Arbitrary Beautiful Colors3 people · 4 points · first shared 2023 · 1 comments on HN
- 3Thoughts on Haskell2 people · 44 points · first shared 2015 · 49 comments on HN
- 4Key-Value Observing Considered Harmful2 people · 9 points · first shared 2013 · 7 comments on HN
- 5Reflections on six months of Swift2 people · 9 points · first shared 2016 · 4 comments on HN
- 6Why I don't write Swift2 people · 4 points · first shared 2015 · discussion on HN
- 7Pure Objects2 people · 2 points · first shared 2014 · discussion on HN
- 8The Context and the Logic2 people · 2 points · first shared 2021 · discussion on HN
- 9Regexes vs. Combinatorial Parsing (2019)1 people · 155 points · first shared 2020 · 45 comments on HN
- 10Doubling Down on Protocol-Oriented Programming1 people · 60 points · first shared 2016 · 8 comments on HN
- 11Model View Whatever1 people · 20 points · first shared 2014 · 8 comments on HN
- 12What is the fuss with Reactive Cocoa?1 people · 10 points · first shared 2014 · 12 comments on HN
- 13A Call for Blogs1 people · 7 points · first shared 2016 · 2 comments on HN
- 14“Metaprogramming” isn’t a scary word (not even in Objective-C)1 people · 6 points · first shared 2014 · 2 comments on HN
- 15MVVM is not very good1 people · 4 points · first shared 2015 · discussion on HN
What HN people wrote when they linked it
wool_gather · 2018-10-19
Not mentioned yet: Souroush Khanlou http://khanlou.com is always at the top of my list. Thoughtful and very practical material. Also Dave DeLong: https://davedelong.com/blog/
> I’ve missed Swift 2 & 3
In some ways this is an advantage to you. There was a fair bit of churn in that time period. Things have settled reasonably well now.
Aker89 · 2016-12-19
can also recommend this approach at the moment: http://khanlou.com/2016/12/guarding-against-long-compiles/
This makes XCode warn you about functions with long compile times.
stevetrewick · 2016-04-23
I've read a ton of such blog posts recently in exploring this subject - seems like the tradition is as soon as you believe you understand the monad you must immediately write a blog post explaining it and pointing out why everyone else's metaphor is too complicated.
This one is kind of nice in its succinctness, but that ends up meaning it doesn't explain why I should care or what I would do with my monad once I have grokked it.
I've yet to write my personal "how I grokked my monad and why everyone else is wrong" post, but I suspect that there's probably a sweet spot somewhere between 'monad is simply a monoid in the category of endofunctors' and a 'plain English' translation of the monad laws with no context. Preferably with an explanation of why I would want or need such a thing up front. Preferably without Haskell notation.
That said, such an intro would probably still be pretty hard going, some things are just hard, or at least difficult to understand without context. I said I've been reading lots of these recently, actually I've been reading them for a couple of years, but I've only been understanding them recently because I've bumped into a problem domain for which the solution I was groping for in the dark turned out to be a monad.
Swift wise, I found the following to be very…
dhussoe · 2025-12-03
I do think that there's a meaningful difference between writing code that was bad (which I definitely did and do) and writing code where I didn't know what each line did.
early on when I was doing iOS development I learned that "m34" was the magic trick to make flipping a view around have a nice perspective effect, and I didn't know what "m34" actually meant but I definitely knew what the effect of the line of code that mutated it was...
Googling on it now seems like a common experience for early iOS developers :)
https://stackoverflow.com/questions/14261180/need-better-and-simpler-u…
https://stackoverflow.com/questions/3881446/meaning-of-m34-of-catransf…
https://khanlou.com/2012/09/catransform3d-and-perspectives/
danuker · 2022-05-17
You can bundle the parameters into plain/pure/humble objects where it makes sense.
https://khanlou.com/2014/12/pure-objects/
http://xunitpatterns.com/Humble%20Object.html
dmur · 2014-03-15
The promise of simplicity does not match the reality. It's explained well here, this was linked in the article too: http://khanlou.com/2013/12/kvo-considered-harmful/