Daniel Hooper

danielchasehooper.com · Personal blog · on HN since 2019

Programmer Daniel Hooper writes about C, Swift, compilers, and developer tools, with graphics and build visualization projects.

What HN saysHN commenters cite his posts on slow Swift type inference, segmented arrays, and type-safe generic data structures in C.
29HN people shared it
12linked it in comments
22stories submitted
2.9Kstory points
4 months agolast shared
2019people per year2026

Most-shared posts

  1. 1
    The Swift compiler is slow due to how types are inferred
    10 people · 266 points · first shared 2024 · 221 comments on HN
  2. 2
    Good ideas in computer science
    6 people · 66 points · first shared 2024 · 13 comments on HN
  3. 3
    An Experienced C Programmer Tries AI Agents
    3 people · 9 points · first shared 2026 · 2 comments on HN
  4. 4
    Programming SDF animations of Rick and Morty
    2 people · 520 points · first shared 2025 · 39 comments on HN
  5. 5
    I made a real-time C/C++/Rust build visualizer
    2 people · 424 points · first shared 2025 · 89 comments on HN
  6. 6
    I write type-safe generic data structures in C
    2 people · 412 points · first shared 2025 · 182 comments on HN
  7. 7
    A fast, growable array with stable pointers in C
    2 people · 218 points · first shared 2025 · 88 comments on HN
  8. 8
    Hot Reloading SwiftUI Apps
    2 people · 6 points · first shared 2025 · discussion on HN
  9. 9
    Making a 3D modeler in C in a week
    1 people · 680 points · first shared 2024 · 187 comments on HN
  10. 10
    A new Sudoku layout with 81 uniquely shaped cells
    1 people · 188 points · first shared 2025 · 75 comments on HN
  11. 11
    Why Swift's type checker is so slow
    1 people · 74 points · first shared 2024 · 74 comments on HN
  12. 12
  13. 13
    Script.js
    1 people · first shared 2025

What HN people wrote when they linked it

jonathanyc · 2024-09-17
I only want one feature from Swift: faster type-checking. If you write a few lines of math, or a moderately complex SwiftUI expression, suddenly the typechecker starts timing out. Swift is the only language I've ever used with this problem. https://hachyderm.io/@evanw/109859384302551859 https://www.cocoawithlove.com/blog/2016/07/12/type-checker-issues.html https://danielchasehooper.com/posts/why-swift-is-slow/ This isn't mentioned at all in the announcement so I'm kind of disappointed.
rubymamis · 2026-01-08
> Both Kotlin and Swift are compiled. I only said that because you said performant code "does not matter for a mobile app". I think writing apps in native frameworks is awesome! I'm all for it. BTW, I've heard some reports that SwiftUI/Swift are slow[1][2][3]. Again, I haven't explored SwiftUI and Kotlin, but I'd like some day. What do you love about them so much? > All that for being at best similar to the native tools, but probably never exactly the same. And it cannot be better, because the native ones are the ones defining how it should be. I agree, the best apps would almost always be those written in the framework the OS provides - kinda make sense - cross platform GUIs will always fall under the lowest common denominator issue - I've written about it in my blog post[4]. You also forget tho, that Linux does exist with a growing popularity - I think it's important to target it as well (I've started GUI development because I was on Linux and most apps had horrible UI/UX). > but starting a new mobile UI with QML these days is just madness IMHO :-) Follow my mad adventure (: [1] https://notes.alinpanaitiu.com/SwiftUI%20is%20convenient,%20but%20slow [2] https://x.com/daniel_nguyenx/status/1734495508746702936 [3] https://danielchasehooper.com/posts/why-swift-is-slow/ [4] https://rubymamistvalove.com/block-editor#9-aesthetics
HexDecOctBin · 2026-07-20
> using arenas for arrays that grow wastes memory a lot since it keeps every previous version around Not if you use segmented arrays https://danielchasehooper.com/posts/segment_array/
chubot · 2025-08-18
Well I Googled myself since I was curious This comment says Rust's type inference is not Hindley-Milner, but rather it's "influenced by" bidirectional type checking: https://lobste.rs/s/hbzctm/type_inference_rust_c (but I think that is about type inference; I think there are parts of the Rust's type checking algorithm that could be described with different terms) --- This post quotes Chris Lattner on Swift, saying https://danielchasehooper.com/posts/why-swift-is-slow/ My experience with Swift is we tried to make a really fancy bi-directional Hindley-Milner type checker So I guess this hints at what I suspected -- that people mean different things when they say "bidirectional" --- But also, it's probably reasonable to put Go and Zig (?) in one category, and Swift and Rust in another
listeria · 2025-08-06
They link to an old article [1] that was featured in HN [2] somewhat recently, in which there's a workaround for older standards with regards to typeof. [1]: https://danielchasehooper.com/posts/typechecked-generic-c-data-structu… [2]: https://news.ycombinator.com/item?id=44425461
rudedogg · 2025-04-25
It has nothing to do with code quality: https://danielchasehooper.com/posts/why-swift-is-slow/
yAak · 2025-04-05
I agree with you, but sounds like a rough problem: https://danielchasehooper.com/posts/why-swift-is-slow/
tener · 2025-03-14
Around midnight LA time, except the code may have a bug (?) with respect to DST changes (uses explicit UTC-8, which won't be correct the whole year). See source code at https://danielchasehooper.com/projects/cracked-sudoku/script.js
aapoalas · 2024-11-14
Here's a good blog post on the issue: https://danielchasehooper.com/posts/why-swift-is-slow/
amimetic · 2024-09-17
There is an article about this based on a Chris Lattner talk/links to previous HN discussions: https://danielchasehooper.com/posts/why-swift-is-slow/
frankjr · 2024-08-10
Does anybody know if the upcoming version resolves the compilation time issues? https://danielchasehooper.com/posts/why-swift-is-slow

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