Hi, everybody. The review for SE-0246: Generic Math Functions ran from March 11th through the 25th. This review was extended several times in order to make some adjustments in response to feedback gathered during the review. The core team would be interested in getting feedback from reviewers on how they felt about this rapid iteration, and in particular on whether they felt it detracted from the process overall.
Feedback was positive on the general idea of providing a standard way of accessing this functionality. Some suggestions were made that the authors agreed with and chose to immediately incorporate into the proposal, leading to extension of the review period. The main suggestions that weren't incorporated into mid-review revisions were as follows:
Several people expressed unhappiness that
logmeant the natural logarithm (base e). Unfortunately, as observed in the review, the most obvious alternative name for the natural logarithm is
ln, which is not a good programming name: it's too short and too visually similar to keywords like
logfor the natural logarithm is also extensively precedented in many programming languages, including C, Swift's most obvious antecedent (and the way that people have gained access to this functionality in Swift before this proposal). Ultimately, the core team believes that sticking with
logis the best choice even if there's some risk of people using it when they meant
There was a suggestion that create a
Mathmodule might create conflicts with names used by other libraries today. The core team agrees that this is an issue which needs further study and work, but decided to define it away for this proposal by simply merging the proposed
Mathmodule directly into the
Swiftmodule, which already has some similar math functions (such as
floor); there didn't seem to be a strong motivation for separating out the functions proposed here.
Therefore, SE-0246 is accepted with the modifications that the
Math library should not be added and that the proposed new entities in it should instead be added directly to
Swift. If the community finds this worthy of further debate, the core team is willing to put SE-0246 with these modifications up for further review; just let me know, either in this thread or privately via email or direct message.
As always, thank you for helping to make Swift a better language.