Error formatting macro: pagetree: java.lang.NullPointerException
Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History


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)