Imagine your friend, thinking about learning programming, or switching to new languages.
In this case, The Ruby Reference would be a pretty handy point-of-entry to the Ruby world.
If you receive a user input in your application, you need a validation – no doubt about it.
When thinking about the validation in a Ruby on Rails application we used to think about a model validation in the first place.
But how about other levels of the validation?
Are you tired of calling .freeze on your data structures (or your colleagues forgetting to do so)?
Do you wish Ruby had a literal for creating immutable arrays?
Then persistent-💎 aka persistent diamond is for you!
Sometimes it makes sense to treat errors as part of an application’s “valid” flow of events.
Meaning, expected errors should not necessarily make your code go crazy when random errors are raised.