Bug 1589072 Comment 23 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Thanks for helping, Jan.

Thanks for the patch, Rohit. This patch only changes one of the two error messages.

Now I wonder if we can do even better than V8. "Numeric separator" is pretty jargony; if we say "underscore" it will probably be clearer what the error is about.

for `123_`,
current: `"missing digit after '_' numeric separator"`
V8: `"Numeric separators are not allowed at the end of numeric literals"`
is this better?: `"number can't end with an underscore"`

for `1__234`,
current:  `"missing digit after '_' numeric separator"`
patch: `"multiple numeric separators '_' are not allowed"`
V8: `"Only one underscore is allowed as numeric separator"`
is this better?: `"number can't contain multiple adjacent underscores"`
Thanks for helping, Jan.

Thanks for the patch, Rohit. This patch only changes one of the two error messages. I think we should change both.

Now I wonder if we can do even better than V8. "Numeric separator" is pretty jargony; if we say "underscore" it will probably be clearer what the error is about.

for `123_`,
current: `"missing digit after '_' numeric separator"`
V8: `"Numeric separators are not allowed at the end of numeric literals"`
is this better?: `"number can't end with an underscore"`

for `1__234`,
current:  `"missing digit after '_' numeric separator"`
patch: `"multiple numeric separators '_' are not allowed"`
V8: `"Only one underscore is allowed as numeric separator"`
is this better?: `"number can't contain multiple adjacent underscores"`

Back to Bug 1589072 Comment 23