Skip to content

Make the meaning of "Error" clearer in the Generics docs #2384

Open

Description

@JadenV15

I think the Generics docs is confusing in the way it describes errors. Currently, the following code comments are used:

  • # INVALID
  • # illegal
  • # Error
  • # Rejected
  • # NOT valid
  • # Not OK
  • # Type error
  • # Type checker error

These don't distinguish between actual runtime errors vs type checker warnings in code examples. Only the last one is fully clear.

What do we think?

Activity

  1. JadenV15 commented on Nov 3, 2026

    @JadenV15
    Author

    Actually, this issue seems to apply to many pages of the typing docs.

  2. JelleZijlstra commented on Nov 4, 2026

    @JelleZijlstra
    Member

    Yes, this is a common issue. I think for clarity we should standardize on "Type checker error" and "Runtime error". ("Type error" is confusing as it may be read to mean TypeError is raised.)

    The runtime typing code may have bugs or inconsistent behavior and fail to raise errors for some conditions that could in theory be detected at runtime. In the spec we should focus on type checker errors and it can be OK to write "Type checker error" even if the code also raises at runtime. The spec shouldn't depend on exactly which issues are caught by the runtime typing machinery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions