Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Not convenient communicating to analysis

  • Only specific reader metadata survives analysis
    • Usually related to compilation or debugging
    • :tag, :line, :static
    • Can only attach in specific contexts
      • parameters
      • local bindings
  • Makes it difficult communicating to tools that utilise the results of analysis
  • Example: attaching metadata to function calls
    • ^{:my-m 1} (float? 1)
    • :my-m is irretrievable from analysis
    • Problem: cannot expect to attach metadata to macro calls or inlining functions.
  • Any other examples?
  • Use case: annotating polymorphic function calls with type arguments in Typed Clojure
    • ^{:inst [Integer Integer]} (my-poly arg1 arg2)