Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If we have anything called
PI
--- even if it is properly encapsulatedinside a C++ namespace! --- then users will be unable to use our library
if they also depend on any library that defines a macro called
PI
,in any namespace (because macros do not care about namespaces).
Of course, defining a macro named
PI
would be an execrable andamateurish violation of long-accepted best practices for C++ software
engineering. However, at least one library does this: the Arduino core
library. Therefore, if we want to support it --- which we most
certainly do --- then we will have to yield.
The plan going forward is to release this deprecation as part of 0.3.5,
and then fully delete the variable as part of 0.4.0. In the meantime,
users can still get Au to work; they just need to make sure that they
include Au after any files that --- lamentably --- define a macro
PI
.We have other "short all-caps" identifiers,
ONE
andZERO
. We couldget rid of
ONE
with no trouble at all;mag<1>()
is a finereplacement. Getting rid of
ZERO
would be extremely painful, though.The motivation to define a
ZERO
macro is far less than forPI
, so Iam planning to simply hope that no library of note has done this, and
expecting to tell users of any such library that they are simply out of
luck.
Fixes #246.