[swift-evolution] TrigonometricFloatingPoint/MathFloatingPoint protocol?

Taylor Swift kelvin13ma at gmail.com
Tue Aug 1 10:02:49 CDT 2017


I think the Server APIs project was pretty close to what I had in mind
actually. I don’t see why more core libraries can’t be commissioned that
way, things like Math and DateTime would probably draw a great deal more
attention than Server APIs since they are used by more people. One thing
that would have to be fixed though is the cross-module optimization
problem; no one in their right mind should ever be making generic calls to
sin(x). A feature in the SPM that would perform “injection” of core library
code into the interior of modules would probably be enough to fix this
problem for now. (If this sounds hacky just remember that right now
everyone seems to be copying and pasting .swift files everywhere.)
Everything internal would become fileprivate and everything public would
become internal. A good Swift library should expose no more than 7 or 8
symbols at the top level so this should play nice with most client projects.

On Tue, Aug 1, 2017 at 4:50 AM, Ian Partridge <ian at poncho.org.uk> wrote:

> On 1 August 2017 at 04:46, Taylor Swift via swift-evolution
> <swift-evolution at swift.org> wrote:
> > I’m not saying the Swift team should devote any time or resources to
> writing
> > these things, but it’d be a huge benefit if someone were to say “okay we
> are
> > commissioning a core library that does X, the code will live in Y Github
> > repository, we’ve set up Z mailing list for this, and anyone who is
> willing
> > to invest time in this is welcome to help make this a reality”. Then
> > everyone with an interest in seeing these things get built would be able
> to
> > coordinate.
>
> That's what's happened with the Server APIs Project
> https://swift.org/server-apis/
>
> I would like to see more of this, and math/BigNum seems like a good
> candidate.
>
> Another is a modern date/time package, standing on the shoulders of
> https://jcp.org/en/jsr/detail?id=310 and similar.
>
> --
> Ian Partridge
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170801/7f441276/attachment.html>


More information about the swift-evolution mailing list