Rfcs: Rename type to typedef.

Created on 22 May 2019  路  2Comments  路  Source: rust-lang/rfcs

I think using keyword type to define new types big mistake, because the type can be in anything struct. (Type of order, type of filed). Now I shold write type_ insted of type becouse is keyword. I propouse rename type to typedef in the next big language iteration. Is such a change possible? Should I write rfc?

A-syntax T-lang

Most helpful comment

I might be mistaken, but it seems extremely unlikely that such a change would be accepted. It would cause massive churn, and the only benefit would be to free up a new identifier. For the particular issue you mentioned, the common solution is

  • use ty or kind instead
  • if it absolutely must be type, you can use raw idents: r#type

All 2 comments

I might be mistaken, but it seems extremely unlikely that such a change would be accepted. It would cause massive churn, and the only benefit would be to free up a new identifier. For the particular issue you mentioned, the common solution is

  • use ty or kind instead
  • if it absolutely must be type, you can use raw idents: r#type

I think it's safe to say that we are not renaming type aliases to typedefs even in an edition since it would bring a large amount of churn for little gain. I'll go ahead and close this since I expect the rest of the team to agree.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

p-avital picture p-avital  路  3Comments

clarfonthey picture clarfonthey  路  3Comments

torkleyy picture torkleyy  路  3Comments

mahkoh picture mahkoh  路  3Comments

Diggsey picture Diggsey  路  3Comments