StabbyCutyou / generics

Package generics is the true way to program generically in golang
Apache License 2.0
193 stars 9 forks source link

add enhanced Thing interface #21

Closed buddhamagnet closed 7 years ago

buddhamagnet commented 7 years ago

Firstly may I say how incredible this package is, I've needed generics for an age. I've already used this in production code and the productivity and spiritual well being of my team has exploded. They have also started using the gophers Slack channel again without fear of getting into any discussions about generics.

I've added what I consider a useful enhancement to this package, namely the Thing interface. Benchmarks indicate it performs as well as G and the addition is fully tested. Thanks for changing history.

There is one small issue though, I'd like the Thing interface to be covered by the MIT licence. Could we have two licences in the repo please. Thay way people could copy the Thing interface so long as they adhered to the MIT terms and the original G interface would be covered by Apache?

StabbyCutyou commented 7 years ago

Allow me to say what an absolute thrill it is for me to hear that so many gophers world wide are using, enjoying, and thriving with package generics. Truly, it's you who this package is for, and not me.

That said, at this time I cannot accept this PR as it stands for a few reasons, but I'll offer some suggestions.

First, why I cannot accept it:

  1. Having 2 approaches to generics is potentially confusing to users. The beauty of G is in it's simplicity, and strict adherence to the principles of golang itself. There is only one, true, correct way to do generics - and it is G

  2. At this time, I'm not looking to extend or mix the licensing model. Now, this could change in the future, but for now, I am happy with the current license.

That said, I offer you an olive branch:

The magic of Open Source Software is in our ability to share, and to grow. If you feel the Thing solution to generics is truly superior, I would invite you to support it in 1 of 2 ways:

  1. A fork of generics, with Thing added in. So long as attribution to the original project is kept, I don't have an issue (but you would need to adhere to the original projects license)

  2. A completely new project only supporting Thing. In this sense, you'd be free-er to use your own license, but I would ask that you still include some attribution to package generics as an inspiration to your own excellent work.

Thanks for supporting G, and I look forward to seeing the thought-leading you'll continue to do in the space of generics!