New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make code more readable. #1
Conversation
|
I like it, but can you |
|
Done! |
|
Thanks @Haihappen! |
|
Ugh. I'm a big |
|
@steveklabnik really? Why exactly? It's so much better to read imho. |
|
Well I agree that it's a lot easier to read, but if Rails stopped using it internally then that's a death sentence for In general I'm not that happy with many core exts in AS, but since ruby 2.0 will bring refinements (\o/) and since this gem will be used with Rails exclusively my thinking basically was to adhere to the Rails coding standards. |
|
I don't find it to be more readable. I recognize that this is taste. It's also backwards from an OO perspective. You ask an array if something is in it, not something if it is in an array... Anyway, yes, see this recent commit: rails/rails@447b6a4 |
:'( We apparently have very different tastes in Ruby. |
|
IMO Refinements are a superior solution to open classes, because they require opt-in. That way the're kinda like scala's implicits conversions/parameters, which are nice because they'd let me use - say - the old meta_search DSL that monkeypathes (implict conversion/refinement) Symbol next to whatever else that doesn't expect Symbol#greater_than Anyway, that commit is a good reason to revert. Sorry @Haihappen. |
|
@MSch we should keep up with Rails Core team, so feel free to revert this commit! @steveklabnik I should definitely read more Rails commits since Rails is a set of good practices. Will never use |
This thread isn't about refinements, though, so it's super OT, just sayin'. |
agree |
I know, it is a ridiculous change, but it makes the code much more readable.😃