# Be Smart, Constrain Your Types to Free Your Brain!

Admit it: You have used a `String` to model email values, even though most strings aren’t valid emails (don’t worry, we all have!). Imprecise data models are easy, but they crash applications and corrupt external systems. On the other hand, precise data models take time and generate boilerplate.

So-called newtype libraries have stepped up to the challenge, making it easier to model data precisely using runtime validation. However, newtype libraries aren’t able to validate constants at compile-time.

Enter *ZIO Prelude Smart Types*, which make it simple to model data types precisely, without any boilerplate, runtime overhead, or compile-time overhead. *ZIO Prelude Smart Types* work at compile-time and runtime, and they have a uniform API across Scala 2 & 3.

**Watch the recording:**

%[https://www.youtube.com/watch?v=FDVcNyLfX_I] 

<div data-node-type="callout">
<div data-node-type="callout-emoji">💡</div>
<div data-node-type="callout-text"><em>You can find the slides </em><a target="_blank" rel="noopener noreferrer nofollow" href="https://www.slideshare.net/jv2301/be-smart-constrain-your-types-to-free-your-brain" style="pointer-events: none"><em>here</em></a></div>
</div>
