Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

And somewhat ironically Rails deprecated the particularly magical features like `find_by_name("Bob")` aliases in favour of saner variants like `find_by(name: "Bob")`.


What a great change.

It always seemed ridiculous to put the lookup key and lookup value in two different places.

Nice to see Rails reconsider these things I once thought it would never surrender.


Ruby didn't have keyword arguments when they came up with the initial approach.


That's not why they did it.

For example, they could've used maps:

    find_by name: "foo"




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

Search: