I’m a little late to this, but I have a few opinions on this proposal.
I agree with a lot of the other people here that the
.Mathnamespace is detrimental and unnecessary. This feels like namespacing for namespacing’s sake, and just adds meaningless noise to source code. It’s also inconsistent with the current homes of
Double.e, and despite what some people are suggesting, we are not getting rid of those anytime soon, considering how widely used they are.
I’m gonna come out and say that I think the
Mathmodule providing the free functions just doesn’t make a lot of sense. It’s kind of pointless to import a whole module just to get access to abbreviated function names. I can see myself asking myself “will I be using
sinenough in this project to justify
Math, or should I just stick to the standard library
sin(_:)function?” which doesn’t seem ideal
The circumstances also seem pretty contrived,, the whole justification for free functions comes from the fact that
Double.Math.cos(x)is so long to type, but that’s an argument for getting rid of the
.Mathnamespace, not for introducing a whole new redundant module.
I see a lot of people bikeshedding the
lnname. I personally prefer
lnbut do y’all really use it often enough for it to make sense for it to dominate this much of the conversation?