JuliaMath / JuliaMath/Tau.jl

Create a script to help conversion of 2pi

Open
#24 2 comments 0 reactions 0 assignees View on GitHub
hacktoberfest
Dominant language
Julia
Stars
40
Forks
7
PR merge metrics
No merged PRs in 30d

Description

From [issue #22](https://github.com/JuliaMath/Tau.jl/issues/22#issuecomment-302512650):

> [Automatically converting `2pi` to `tau` could actually be] counterproductive to the "tauist cause": if one chooses to use the Tau package, it would make sense for them to take the extra step to change their code to explicitly reflect their choice of circle constant, rather than leaving the 2pi's around.
>
> With that in mind, though, I think it would be nice to provide some sort of warning for when a downstream package uses 2pi in its code -- which could be done by overriding `*(2, pi)`, without changing its resulting type. I'm not sure if it's possible to distinguish code from a module from code from modules it imports (we wouldn't want to warn a user of instances of 2pi in packages they didn't author);
>
> If that distinction is not possible (or the warning approach found too intrusive), then an alternative could be a helper script or method in this package that would process a given module or file and output a list of locations where 2pi could be replaced by tau. This is easy enough to do by hand, but depending on the search method, one could easily miss valid instances -- `2pi`, `2*pi`, `2 * pi`, `2.0 * pi`, `pi*2`, etc. -- so an automated process might be useful.

To which @giordano replied:

> I don't have a strong opinion on this. In any case, I wouldn't make it part of the package itself, at least an extra script to be placed outside `src` directory.

So this issue it to track the implementation of such a script.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.