Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • Affects versions: Release 1.3
    • Fix versions: Release 1.3
    • Labels:
      None
    • Approval:
      Ok
    • Patch:
      Code and Test

      Description

      Currently, return type hints must be on function or var names, e.g.:

      (defn ^String foo [])

      This is in contrast to primitive return type declarations, which must be on function arg vectors:

      (defn foo ^long [])

      The latter is preferred because:

      • Different arities of the same function can be typed differently
      • All of the type information for a given function hangs off of a single value (the arg vector)

      For these reasons, supporting type hints on arg vectors as well is desirable. This would remove the (confusing and purely historic at this point) syntactic difference between type hints and signature declarations (with the current function/var name hinting support to be potentially deprecated and removed in the future).

      As a pleasant side effect, this would disambiguate the semantics of var :tag metadata, thereby resolving CLJ-140 Open .

        Attachments

          Activity

            People

            • Assignee:
              cemerick Chas Emerick
              Reporter:
              cemerick Chas Emerick
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: