Skip to content

Consider removing -> ! #7680

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
brson opened this issue Jul 10, 2013 · 7 comments
Closed

Consider removing -> ! #7680

brson opened this issue Jul 10, 2013 · 7 comments
Labels
A-grammar Area: The grammar of Rust A-type-system Area: Type system

Comments

@brson
Copy link
Contributor

brson commented Jul 10, 2013

As mentioned in #7538, ! could be represented as an uninhabited type.

@emberian
Copy link
Member

If we do do this, I'd like the name to be NoReturn, ie, fn foo() -> NoReturn. Void is an awful name.

@nikomatsakis
Copy link
Contributor

I'd prefer to leave it as !, I think. Using Void (or NoReturn) would be better if the return value were treated just like any other type, but faliing functions are treated very specially by all flow-sensitive checkers, and I find the use of a symbol more indicative of that special treatment.

@nikomatsakis
Copy link
Contributor

If we WERE to do this, probably Fail would be the right name, though. (imo)

@bstrie
Copy link
Contributor

bstrie commented Jul 15, 2013

Nominating for Well-Defined.

@brson
Copy link
Contributor Author

brson commented Jul 19, 2013

I also prefer not to remove !

@bblum
Copy link
Contributor

bblum commented Aug 22, 2013

functions that infinite loop also return !, so i don't think fail would be an appropriate name. ! is fine, but i wonder if we could also allow it to be a type name in other locations, and remove the Void enum in util?

@catamorphism
Copy link
Contributor

We decided to reject this proposal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: The grammar of Rust A-type-system Area: Type system
Projects
None yet
Development

No branches or pull requests

6 participants