HNHacker News
TopNewBestAskShowJobs

columnarx3

12 karma · joined February 10, 2026

submissionscomments
columnarx3··on Parse, Don't Validate – In a Language That Doesn't Want You To
I think this is the wrong pattern in this instance. You parse an email or phone number because validating leaves it as a plain string, and you lose the context to know for sure if that string is actually an email or phone number.

In your instance, you could have:

  type User = {
    // ... rest of fields
    email: {
      verified: boolean,
      // branded type here ensures that this string is a proper email address
      value: EmailAddress,
    },
    birthday: Date | null,
  };
In this instance, your logic with a method that accepts birthday and email has all the information it needs to make its choice.
columnarx3··on Statement on US government directive to suspend access to Fable 5 and Mythos 5
People choose SOTA right now because of the heavily subsidised model subscriptions. People aren't going to pay 20x the price for a model that's maybe 10% better.