Uploaded image for project: 'core.typed'
  1. CTYP-292

Provide a new alias for Any, dedicated for use as a placeholder, thus reserving Any for situations when truly every type is acceptable.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Declined
    • Affects versions: None
    • Fix versions: None
    • Components: None
    • Labels:
      None

      Description

      When adding type annotations to code that was previously untyped, it's often useful to do so in stages. A common early step is to use Any liberally to avoid getting stuck figuring out the "best" type for a Var. (For example, see this pull request, in which clojure.zip/zipper is given the type [Any Any Any Any -> (Vec Any)].)

      The problem is that there's no way to tell whether a given occurrence of Any is functioning as a temporary placeholder, or whether it's expressing the fact that truly every value is acceptable.

      I propose a new alias for Any that will enable users to distinguish between these two usages. I don't feel strongly about the name of the alias, but in the absence of other suggestions I nominate Dunno because it concisely expresses the phrase "I don't know".

        Attachments

          Activity

            People

            • Assignee:
              ambrosebs Ambrose BS
              Reporter:
              merelyapseudonym Josh Tilles
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: