Skip to content
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

Name things consistently and idiomatically #287

Open
1 of 5 tasks
Nadrieril opened this issue Jul 9, 2024 · 1 comment
Open
1 of 5 tasks

Name things consistently and idiomatically #287

Nadrieril opened this issue Jul 9, 2024 · 1 comment
Assignees

Comments

@Nadrieril
Copy link
Member

Nadrieril commented Jul 9, 2024

Naming could be improved across the project. Among other things:

  • "assumed" should be renamed to "built-in";
  • Id is a confusing suffix for a rust user: it normally designates integer identifiers only;
  • Similarly, Raw is used in places where a rust user would naturally use a Kind suffix, e.g. TerminatorKind;
  • Traits and clauses and predicates are subtle things, I think better names would help follow what's happening. E.g. TraitInstanceRef instead of TraitRef, TraitClause or TraitBound instead of TraitDeclRef, something else instead of TraitClause.
  • Names don't always match between the rust and ocaml sides. Once we're happy with the rust side we should propagate the changes.
@Nadrieril
Copy link
Member Author

Nadrieril commented Sep 12, 2024

My current list:

  • RawStatement -> StatementKind
  • RawTerminator -> TerminatorKind
  • RawConstantExpr -> ConstantExprKind
  • FunIdOrTraitMethodRef -> FnPtrKind
  • FunId: merge into FnPtrKind
  • TypeId -> make TypeRef that carries GenericArgs, and rename to TypeRefKind
  • ItemKind -> ItemContainer
  • RawSpan -> SpanData
  • Var -> Local
  • TraitClause -> WhereTraitClause
  • TraitDeclRef -> TraitClause
  • TraitRef -> TraitInstanceRef
  • AnyTransId -> AnyItemId

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

1 participant