Skip to content

Feature request: Assume sane defaults for numeric literals. #17304

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

Closed
sandeep-datta opened this issue Sep 16, 2014 · 2 comments
Closed

Feature request: Assume sane defaults for numeric literals. #17304

sandeep-datta opened this issue Sep 16, 2014 · 2 comments

Comments

@sandeep-datta
Copy link
Contributor

Please consider adopting sane defaults for numeric literals, drop the gratuitous i(s), f(s) etc. everywhere.

Prefer...
let nums = [1, 2, 3]; //Assume all integer literals are of type int.
over...
let nums = [1i, 2i, 3i];

Let the type checker point out misuse of literals.

@alexcrichton
Copy link
Member

Closing as a dupe of #16968

@sandeep-datta
Copy link
Contributor Author

Thanks Alex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants