Error formatting macro: pagetree: java.lang.NullPointerException

Versions Compared


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


  1. For example, you may want *unchecked-math* to be true for part of a function's definition, either a few individual subexpressions, or a larger part of it.
  2. Another is that you want *warn-on-reflection* to be true for most of your library, but there are a few instances of reflection that you are aware of and either they cannot be eliminated, or they are rare enough in practice that they are not a performance problem.  You want to mark the expressions using reflection so that they do not cause a compile-time warning, but you want such warnings enabled everywhere else in that same function in case future changes introduce a new use of reflection.

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 such.  From that point forward, every time a developer adds 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.

Proposal A: new special form compile-time-let