Sorbet allow for static (and runtime) analysis of Ruby code by adding type annotations. This can be leveraged to get rid of a lot of switch statements like:
case some_var
when 1
else
boom "some execption"
end
The Sorbet runtime consistently warns when an unexpected branch is reached.
Sorbet allow for static (and runtime) analysis of Ruby code by adding type annotations. This can be leveraged to get rid of a lot of switch statements like:
The Sorbet runtime consistently warns when an unexpected branch is reached.