-
Notifications
You must be signed in to change notification settings - Fork 911
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
Use arrow functions instead instead of normal ones #2198
Comments
I approve. ES6 was finalised in June 2015. This along with the other changes relating to ES6 moves Music Blocks beyond compatibility with most instances of Sugar. I'm fine with that, as it was never released for older platforms. I'll make sure to advise against trying it. |
@quozl Thanks for approving the change. |
Let's also have a task list to keep track:
|
Re James' comment, I had been pretty diligent about keeping E6 out of MB for a long time, but during GCI, I had let down my guard, so that bridge has already been crossed. |
Still quite a few places we should make these changes. |
Hey , if this is still open . I want to contribute. |
Please make a pull request. |
It says I can't commit since I don't have access to musicblocks |
You cannot make a PR? Or you cannot merge your PR? |
Sounds like forgot to fork. |
I would love to contribute, can you assign it me? |
We don't assign issues, but please feel free to make a pull requet. |
Changed existing function syntax to match ES6 arrow function syntax
@walterbender can you review my pull request, I have added it just a moment ago. Let me know if there are any changes needed |
Changed existing anonymous function syntax to match ES6 arrow function syntax
Hey, Can I work on this issue? |
@simplysabir we don't assign issues, but please feel free to make a pull request. You should have seen that said already in this issue. If you have seen somewhere that says you have to ask before fixing a problem, please point it out to us so we can correct it! We like to merge the best possible pull request. |
*Changed existing anonymous function syntax to match ES6 arrow function syntax *Got rid of `this` binding in some files
* Changed existing anonymous function syntax to match ES6 arrow function syntax * Got rid of `this` binding in some files
@walterbender is there any need to change the /js as mentioned by @aviral243. He already did these changes but didn't merge it, rather he closed the pull request. |
I think he is going to reopen with just the changes to /js and not the other changes. |
@walterbender Can I do this for a time being ? I think /js is the last file to be updated. We can close this issue with that being done |
It would be much more useful if you'd work on one of the "good first" issues with more substance. |
Hey, I'm working at this issue right now, is that all right? |
Looking forward to seeing the PR |
I'm converting normal functions into arrow functions
and working forward !! |
|
I see the issues aren't being assigned to anyone. Can I start working on it too? |
Hey @walterbender, I've made a Pull Request. Could you see it, please? |
We support any number of pull requests. When working closely with others, and the changes are likely to be merged (as in this case because they are straightforward), it can help if you rebase from each other's pull request branches. That means the maintainer may need to only merge one pull request instead of several. If there's something about the other person's commits that mean you won't rebase or cherry-pick them, then that means you really ought to talk to them about it in their pull request. |
Now should I just rebase from the other person's pull request branch? |
I have solved this issue just look my Pull Request. Please |
Thanks. It's great that so many people are helping. If you are waiting for review, please take a moment to review one of the other pull requests on the same issue. The recent pull requests relating to this issue are;
You might detect mistakes, accidental changes, help maintain consistency and code quality. You might test the changes to see if they work for you; if so, post a comment to say what you tested. Be sure to test MusicBlocks first without the changes, we don't want to hear about your problems testing that aren't related to the pull requests. See our Guide for Reviewers. |
i am interested to work on this issue , can i start ? @quozl |
@hirentimbadiya please read through the issue comment thread. You will observe that (1) we don't assign issues but we do accept PRs and (2) many others are already working on this issue. I would recommend you tackle a different one (there are many marked "good first issue". |
@hirentimbadiya, I agree with @walterbender. We do not assign issues. You should do whatever work you choose and make a pull request, or if there are pull requests already open help others with them. Given how many people are working on this issue now, you may find it quite difficult to engage with it, but if working with other people is your speciality, get involved in their work. 😁 |
I think this is well covered now. Thanks to everyone who contributed to this issue. |
As we move towards using
let
instead ofvar
, we can also make use of another ES6 Javascript feature; Arrow functions. The benefits of using it will be:this
binding.e.g We come across instances of such format in our code where we need to bind
this
to use in surrounding code:Arrow functions do that automatically.
e.g. An arrow function with no parameters and no body
let func = () => 1;
e.g. Functions with one parameter can also be defined without parantheses
let func = x => { return 2*x; }
Additional Context: I am working on this.
The text was updated successfully, but these errors were encountered: