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

const is too verbose! Make it default when assignment is done by := #1276

Closed
Kimilhee opened this Issue Jul 26, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@Kimilhee

Kimilhee commented Jul 26, 2018

Feature Request

I think good language has a good default syntax.

In es6 and above, more than 95% of the variables is declared as const.
Then, let's make it default!

My Feature request
Instead of this

const id = 123;

This is far better! concise and shorter!

id := 123;

I know that this one declaration seems not so much difference.

But, you con easily find the following case!

const id = 123;
const str = 'ABC'
const time = new Date();
const reg = /abc/;
const ....

Let's do it just like this.

id := 123;
str := 'ABC'
time := new Date();
reg := /abc/;
....

Done.

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Jul 26, 2018

Contributor

This is not the right place to propose changes to ECMAScript. I recommend reading through https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md.

Contributor

annevk commented Jul 26, 2018

This is not the right place to propose changes to ECMAScript. I recommend reading through https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md.

@ljharb ljharb closed this Jul 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment