|
|
|
|
|
by hakunin
206 days ago
|
|
I built portrayal[1] (a much simpler replacement for those dry libs), and was also experimenting[2] with runtime-enforced types based on this lib. My general thoughts is that declaring types in Ruby is unnecessarily complicated, because you're basically just running values through pieces of boolean logic, and nothing else. Might as well make that explicit, which is what my experiment did. I didn't however publish the types library, but the concept was proven. [1]: https://github.com/maxim/portrayal [2]: https://max.engineer/portrayal-guards-poc |
|
I'd be interested in hearing your opinions on other runtime approaches like contracts.ruby, literal.fun and LowType of course.