Skip to end of metadata
Go to start of metadata

Rationale

Given that Clojure constrains import, it could infer/guess more about untyped method calls.

Plan

  • Given (.foo untyped-x ...)
    • See which imported classes have a foo method of matching arity
    • Compile one or more speculative typed calls
      • if type guard fails, default to reflection
  • Auto-method wrapper generation based on above
    • (map .foo ...)
    • caching?

Issues

  • Wait for new compiler
Labels:
  1. Sep 09, 2012

    not sure what "caching?" means above but I have some changes to clojure that cause it to generate code that caches reflector objects (Methods) for reflective calls.

    https://github.com/hiredman/clojure/commits/reflection-method-caching