-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
'var' as alias for 'let mut' #2304
Comments
Personally, I think that since we use
Adding I could however see and support a bare |
Note that function arguments, |
Also "variable" doesn't mean "mutable", it means "the value may vary with each execution". |
This is a bit of a false analogy, as |
This may be unrelated but it would be nice if I haven't really thought about the implications of such a thing, just throwing it out there. |
It works, so does |
@whataloadofwhat you don’t want to mix external with internal mutability. |
With the |
@rust-lang/wg-wasm I'm of the opinion of others here that |
Also, Don't think this is a good idea based on what others have already said. |
I agree with @mgattozzi in that I don't think the additional keyword would pull its own weight, and it would do more harm than good. Rust is already essentially totally different than JavaScript, so introducing an extra keyword would hardly help. |
This is a very weird argument: IMHO, you should not use |
Previous discussion: rust-lang/rust#2643 |
@killercup Indeed, It will still be supported indefinitely (for backwards compatibility), but the JavaScript community consensus is that As for this topic... I completely agree that we should try to help out JavaScript programmers, I think Rust has great potential for being a first-class citizen on the web. I want Rust to succeed not just on the desktop and server, but also in web apps, Chrome / Firefox extensions, iOS, Android, etc. I applaud @pannous for their good intentions. However, adding in
Therefore, because of all those reasons, I think adding in I say all of that despite the fact that JavaScript is the first language I learned, and I've been programming in JavaScript for over 11 years. I am a JavaScript to Rust convert, and I think Rust having If we want to convert JavaScript programmers to Rust (and I think we do want that), then I think the best way is to create some well-made tutorials explaining the differences between JavaScript and Rust, helping JavaScript programmers understand tricky Rust concepts (such as memory and borrowing), and also explaining why Rust does things the way that it does. In other words, a tutorial carefully designed for JavaScript programmers, explaining things from the perspective of JavaScript programmers. |
based on eloquent consensus this chapter is hereby closed |
Now that rust compiles to wasm it would be nice to play to the Web community.
Thus a shortcut
for
would not only safe four keystrokes in each instance but also be nicer on the eyes and easier to grasp for newcomers. var for 'variable' already entails the concept of 'mutability', so it is a fit name.
The text was updated successfully, but these errors were encountered: