# Semantic Types: Making Data Mean Something

Q: Why are the goals of this project?

A: Allow users to better organize their information.

If you’ve spent time around computers, you’ve probably heard of data types: strings, integers, floats, and so on. These are the building blocks of how computers think about information. But while data types tell computers how to store and manipulate data, they don’t tell them what the data means. And that’s where semantic types come in.

Semantic types aren’t about syntax; they’re about meaning. They’re a way of saying, “Hey, this isn’t just a string—it’s an email address” or “This isn’t just a number—it’s someone’s age.” They’re the layer of understanding that bridges the cold, mechanical world of data types and the messy, human world of meaning.


### Why Semantic Types Matter

The world is complex and often appears chaotic. Language, too, can be imprecise, mirroring the intricacies of reality itself. To manage this complexity, we simplify things. We distill vast, nuanced information into simplified points that allow us to make sense of our surroundings. This balancing act—between oversimplification and overloading with nuance—is where semantic types shine.

Human languages thrive on nuance and complexity, but tools like lists, databases, and programming languages often oversimplify things. They’re designed to make building systems easier by taking a general-purpose approach. However, this oversimplification creates a gap—one that forces developers to repeatedly create custom solutions due to a lack of standardized tools that support truly flexible and adaptable patterns.

Let’s start with an example. Imagine you’re building a web form. It’s collecting all kinds of data: names, email addresses, dates, phone numbers. The form itself doesn’t care what kind of data it’s collecting; to the computer, it’s all just strings. But you care, because you want to make sure people aren’t putting “Banana” in the email address field.

If your form recognizes that a field’s semantic type is “email address,” you can validate it properly. Suddenly, you’ve got a smarter system—one that understands a little bit about the world it’s operating in. That’s the power of semantic types. They let systems reason about data based on what it *is*, not just how it’s stored.


### Semantic Types in the Wild

You’ve already met semantic types, even if you didn’t know it. Here are some everyday examples:

These types exist in almost every app or system you use, from spreadsheets to social media platforms. They’re what make systems feel intelligent—like when your phone recognizes an address in a text and lets you open it in Maps.


### Why Developers Love Semantic Types

If you’re a developer, semantic types are like a cheat code. They make your life easier in a bunch of ways:


### A Little Philosophy: Data Types vs. Semantic Types

Here’s a thought experiment. You have a number: `42`. What does it mean? It could be: