Skip to content
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

RFRFC remove hash from the Ember lexicon #473

Closed
Tracked by #816
chancancode opened this issue Apr 5, 2019 · 5 comments
Closed
Tracked by #816

RFRFC remove hash from the Ember lexicon #473

chancancode opened this issue Apr 5, 2019 · 5 comments
Assignees

Comments

@chancancode
Copy link
Member

This is specifically talking about calling "map/dictionary" objects as "hash", not about "hash location" in the router.

Problems:

  • hash is probably a Ruby-ism that we inherited, which makes little sense in our JS context
    • aside: hash in ruby refers to the fact that it is implemented as a hash table, however, I believe the more common name for the abstract data type (i.e. decoupled from the implementation) is a map, dictionary or associative array..?
  • In JavaScript, it is probably more common to refer them to just as "objects" (the "o" in "POJOs")
    • a Map is also a thing in modern JavaScript, but it's not what the hash helper produces (maybe it should? probably not? unknown.)
  • A straw-man proposal is to rename the hash helper to obj or object, and (maybe later?) deprecate hash
    • We should provide a codemod
  • What should we call the second argument passed to helpers? The current signature is commonly referred to as "params and hash", and that's the name/identifier we generate for the function parameters in the blueprints. "options"? What about "params", do we want to rename that too?
@rwjblue
Copy link
Member

rwjblue commented Apr 5, 2019

What should we call the second argument passed to helpers?

IMHO, we should call them positional and named...

@dgeb
Copy link
Member

dgeb commented Apr 5, 2019

I would favor transitioning from hash to obj if the fn helper lands in #470 (since they seem analogous).

@locks locks self-assigned this Apr 10, 2019
@bertdeblock
Copy link
Member

Does renaming params and hash in the helper blueprint need to be part of an RFC or is that something we can just do as is? In the Helper Functions guides we also use the term args instead of params.

@rwjblue
Copy link
Member

rwjblue commented Mar 16, 2021

I think that we can change the blueprint argument names independently of a discussion around the "hash" helper.

@wagenet
Copy link
Member

wagenet commented Jul 23, 2022

I'm closing this due to inactivity. This doesn't mean that the idea presented here is invalid, but that, unfortunately, nobody has taken the effort to spearhead it and bring it to completion. Please feel free to advocate for it if you believe that this is still worth pursuing. Thanks!

@wagenet wagenet closed this as completed Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants