Skip to content

crazy idea: change the type keyword #19157

Closed
@JeffBezanson

Description

@JeffBezanson

Over time, this keyword has increasingly bothered me. There are several problems:

  • type is a very generic word and I'd just as soon leave it available for variable names (and keyword arguments!)
  • There are now several kinds of types, so it seems strange to use type to refer only to concrete, mutable, struct-like types.
  • type is the most obvious type-defining keyword, but usually immutable is preferable and recommended.

Here are some alternate keyword suggestions:

  • mutable -- opposite of immutable!
  • struct -- at least says something about what sort of type it is
  • reftype -- for "reference type", which also conveys some of its key properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingThis change will break codeneeds decisionA decision on this change is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions