Work in progress: 181,232 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #14702

D

Dmitriy Kubyshkin

Personal blog · kubyshkin.name/postsprogramming

Dmitriy Kubyshkin's personal blog at kubyshkin.name covers programming. Since 2021, 5 different Hacker News readers have linked it 6 times. The last post was in 2021, but the archive is still widely read.

Visit the blog
6mentions?
5HN people?
2021–2025first – last linked?
Links on Hacker News per year · peak 3 in 2022

Too few sampled comments (4) to say how often HN recommends it.?

Why HN links it

Commenters link Dmitriy Kubyshkin's TypeScript posts, mainly on the newtype pattern for distinguishing types that share a structure. Threads also touch on structural typing and refinement types.

Summarised by Claude from a sample of 4 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

Most-linked posts?

  1. /posts/newtype-in-typescript/
    4 people · 4 mentions · first linked 2021-02-12

What Hacker News says?

  1. Scala _can_ do structural typing, but you almost never see it in the wild so I don't think you'll be able to find any data on it. The main reason why it isn't used in Scala is because it's implemented using run-time reflection which can be slow. From the time I've spent working with Typescript (Probably the most mainstream with with structural types), I don't think structural-by-default is the right approach if we a…

    Comment linking /posts/newtype-in-typescript/

    on “From First Principles: Why Scala?”
  2. Submitted Win32 Window Custom Title Bar (Caption) as a story · 28 points

    HN discussion
  3. The idea is that two types with the same structure aren't always the same thing. This is easily solved by a tagged type in TS [1], though a bit of syntactic sugar over it would be nice. [1]: https://kubyshkin.name/posts/newtype-in-typescript/

    Comment linking /posts/newtype-in-typescript/

    on “Ten Years of TypeScript”
  4. Submitted C Language Enum Tips and Tricks (2021) as a story · 3 points

    HN discussion
  5. As spockz pointed out, you’re looking for the new type pattern. Rust supports this explicitly but you’ve got to do some workarounds to get it in typescript. https://kubyshkin.name/posts/newtype-in-typescript/ Unfortunately doesn’t help much when you’re dealing with functions from packages someone else has typed.

    Comment linking /posts/newtype-in-typescript/

    on “What would it take to add refinement types to Rust?”
  6. mejutoco · 2022-12-03Recommends
    In haskell this is done with newtype. Another example would be using km and miles, and making sure they are not mixed. Here there is an interesting article about doing this in typescript (not affiliated) https://kubyshkin.name/posts/newtype-in-typescript/

    Comment linking /posts/newtype-in-typescript/

    on “Twenty five thousand dollars of funny money”

Search all of HN for kubyshkin.name