jtrivedi / Wave

Wave is a spring-based animation engine for iOS and macOS that makes it easy to create fluid, interruptible animations that feel great.

Home Page:https://jtrivedi.github.io/Wave/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should ubiquitous extensions be made public?

tgrapperon opened this issue · comments

Right now, the library ships with a few public extensions of built-in types that are probably already implemented by clients. For example + and - operators on CGPoint. These extensions will compete with any in-house extension a client defines itself in a standalone helper library, and could cause friction at best, or undefined behaviors at worse.

Of course, these extensions are very nice, but is this the purpose of this library to provide such functionality? If these extensions are not required for the public API of the library (I haven't experimented with it yet), I suppose they should be kept internal.

This is a good point, and one that I was mulling over earlier. I’m happy to thin-out some of these exported extensions.

Thanks for bringing this up!

Removed a handful of public extension methods, most notably the operator overloads for CGPoint. We can can review methods in the future if there are other issues.

7f63519ec8db9f14062133b43b7e3314dabbe3db