← Graph

Dry-types input validation vs full Sorbet typing

question 3 connections

Audience member at wroclove.rb 2024 explains their team uses dry-types to validate input types only at the boundaries (controller actions, worker arguments, CSV rows from external systems) and covers the rest with unit tests — what's the benefit of adding Sorbet on top? Erwin Kroon: Sorbet gives you guarantees at the type level internal to your code (certain methods cannot be called on wrong types), which is complementary to boundary validation. It pulls a class of errors forward the way statically typed languages do — if you validated that you have a user, Sorbet ensures you can't call an Enterprise-only billing method on it.

answer_summary
Sorbet validates type usage internally (like a static language) as a complement to — not replacement for — input validation at boundaries.
question Dry-types input validation vs full Sorbet typing
about
dry-types tool
Questioner's team uses dry-types for boundary validation.
question Dry-types input validation vs full Sorbet typing
about
Sorbet tool
Comparing boundary-only validation with full Sorbet typing.
question Dry-types input validation vs full Sorbet typing
asked_at
Audience question during Q&A.

Provenance

Read by
2 extractions