Hacker News new | past | comments | ask | show | jobs | submit login

Because Ruby has been consistent: there is no method starting with S.

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?




It's a fair point about consistency but its still bad naming. AS accepts both so I don't see a problem. I do hope Ruby will eventually deprecate and rename it to includes? , starts_with? etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: