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
Add missing reserved words: false, let, null, true, and yield. #295
Conversation
Source is the section "7.6.1 Reserved Words" in http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pd f
Furthermore... this list is very, very wrong (unrelated to your changes) |
This needs to be four lists... essentially something like this:
|
Since the purpose of the page (I guess) is to inform someone rather new to JavaScript that there are certain words that should be avoided for variable etc. names, the difference between your first three groups of words might not be that important; even if more correct. What will matter to the reader/user is that some words will throw errors and others won't. So maybe the first two groups of words you mention could be put in one paragraph, with an explanation saying that they will cause an error because they are "parts of the language" or something similar. The third and fourth groups could be put in another paragraph with an explanation saying that they may end up as part of the language and should be avoided too. Maybe a distinction should be kept between what will happen in strict mode and not (i.e. separating group three and four), but could that also cause confusion? Having just two groups, the "Don't use these" and the "Avoid these too" has some simplicity to it. These are just some thoughts. What do you think @rwldrn? |
@alimony more to the point: the existing list is wrong. you can file a PR or I will just fix it. |
@rwldrn Opened #301 for correcting the list. Even though the full list is only considered reserved in strict mode, it is more correct than the previous one… |
Love it! |
#301 is merged. Is there anything else we need to do from this ticket being open -- perhaps the grouping @rwldrn proposed? |
As this is intro-level content I actually think a single list (not grouped) makes more sense |
Nope, @alimony's list is good for me |
Great! |
All of these are only considered reserved when in strict mode, but it is in any case a more correct list than the current one. See jquery#295 for further discussion on how to present this list.
All of these are only considered reserved when in strict mode, but it is in any case a more correct list than the current one. See jquery#295 for further discussion on how to present this list.
Source is the section "7.6.1 Reserved Words" in http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf