Re the new Rails normalize thing ( https://github.com/rails/rails/pull/43945 )
It’s a great example of how not using a data type and instaed dealing with domain data as primitives adds so much complexity. And AR HAS a decent type transformation story already. What you want is an email class or a non-empty string or whatever. But Ruby and Rails culture is to use strings and hashes everywhere.
@davetron5000 yeah, and in Ruby you don’t even need to create a new file. You can experiment and find the shape of classes at very low cost. Get the abstractions fitting together properly. Hashes everywhere means you’re constantly inspecting code and scratching your head.
Can’t get the reference now but I know the anti pattern is called “primitive obsession”.