CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
68 stars 67 forks source link

Units.h > min #152

Closed adundovi closed 6 years ago

adundovi commented 6 years ago

In Units.h we have line:

static const double min = minute;

The problem with it is that it clashes with python function min() which resides in the global namespace. The consequence of it is that CRPropa should always be imported in a separate namespace (import crpropa as crp) since min() is frequently used. I would remove it and leave just minute. What is your opinion? @TobiasWinchen @lukasmerten

lukasmerten commented 6 years ago

We should remove it since it is very convenient to import the whole crpropa namespace to have natural writing of physical units (E=10*TeV, ...)

TobiasWinchen commented 6 years ago

On Monday 11 December 2017 00:49:41 CET Lukas Merten wrote:

We should remove it since it is very convenient to import the whole crpropa namespace to have natural writing of physical units (E=10*TeV, ...)

I agree; occupying common names is somewhat impolite.

-- Dr. Tobias Winchen Physics Department - Astronomy and Astrophysics Research Group Vrije Universiteit Brussel Pleinlaan 2, 1050 Brussels, Belgium