Versions Compared

Key

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

...

Future plan that I consider the biggest bang-for-the-buck for this idea: In Clojure core and all modular contrib libraries, make it the default to build with reflection warnings enabled.  After type-hinting the ones away that can be easily and safely done so, wrap the rest of the expressions causing the warnings in (known-reflection ...) so they no longer cause warnings, but are clearly marked in the source code as suchcausing reflection.  From that point forward, every time a developer adds code that causes a new reflection warning, they will find out on the very next build attempt, and it will likely get fixed , or marked with (known-reflection ...) , quite soon afterwards.  Such changes in Clojure core and contrib would be done in separate commits after this change was in.

Proposal A: new special form compile-time-let

This is likely the less desirable way to do it.  You can skip it and read Proposal B if you want to get to the good stuff.

Introduce a new special form in Clojure called compile-time-let that takes a vector of bindings, and makes those bindings active in the textual scope of the compile-time-let expression during compile time.  For example:

...