Why is this bad? Makes total sense to me. Now both forms work and hopefully it eventually makes it into the language like often happens. But until it does, why not monkey patch obvious mistakes?
Array has `include?`, Regexp has `match?` and String has `match?` and `start_with?`.
This is consistent: there is no S.
Now when I'm in a codebase, depeneding on ActiveSupport and which parts of it are included, the consistency is now missing. Is it with S or without S?
And what methods DO have the S version and which one do not?
That's where the monkey patching comes in, usually.
But to be clear, I'm stating the facts that many software developer see in the Ruby world when you join an organization that's growing tremendously. As usual, if you fit perfectly in the Rails target and the Devise target, you won't encounter problems.
The load time of a single test is a recurring problem in the Rails world though, so ActiveSupport adds up.
Monekypatching doesn't lead to crash (it can, but that's not the point), it leads to: - Less extendable code - Less learning - Less maintainable code
Even if the damage is small, given how competitive is the world, why taking the chance for no benefit?
Well that's the crux of it here, you see it as damage/no benefit while others in the Rails world disagree. It's a difference of opinions that won't be resolved tonight by arguing on Hacker News. I did like your comment about naming consistency in Ruby though, learned something new.
> This is a bit of a hyperbole statement wouldn't you agree?
I'm not sure, I see many small problems that slowly leads to what the Ruby community is now. That being said, if you look at how many things ActiveSupport monkeypatches, "thousands cuts" it's not an understatement: https://github.com/rails/rails/tree/main/activesupport/lib/a...