‹ BackHN Continuity

Thread

Rusty thoughts on "Parse, don't validate"

95 points · 47 comments · ingve

  1. victorpudeyev · · focus · HN ↗
    ...I'm so happy that I write in untyped languages so I don't have to deal with any of this.
    1. pyrolistical · · focus · HN ↗
      But you kind of do.

      For a untype language like js array, since it can be empty, you have to either always check the length, the item returned, or have a precondition to know the array is not empty.

      All three of those cases is either code or context you’re holding in your head.

      All that stuff is equivalent to a type system

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.