Modern compiled languages allow for many operations and expressions to be done safely at compile-time. A big benefit of this is moving (possibly expensive) operations out of runtime.
These techniques are time-honoured traditions in programming (think pre-rendered graphics in video games). The difference is that previously, this was restricted to hard-coding values computed by hand (confusing!). Now, we can compute them in a more readable way.