typelevel / algebra

Experimental project to lay out basic algebra type classes
https://typelevel.org/algebra/
Other
378 stars 69 forks source link

Renamed 'empty' to 'neutral' and 'isEmpty' to 'isNeutral'. #140

Closed denisrosset closed 8 years ago

denisrosset commented 8 years ago

According to discussion in non/algebra#131

johnynek commented 8 years ago

:+1:

I want to make sure @non is +1.

I think @TomasMikula is (he suggested the change) as is @rklaehn, which along with @non seems like a quorum of the most active contributors/users.

TomasMikula commented 8 years ago

+1 On Dec 21, 2015 2:17 PM, "P. Oscar Boykin" notifications@github.com wrote:

[image: :+1:]

I want to make sure @non https://github.com/non is +1.

I think @TomasMikula https://github.com/TomasMikula is (he suggested the change) as is @rklaehn https://github.com/rklaehn, which along with @non https://github.com/non seems like a quorum of the most active contributors/users.

— Reply to this email directly or view it on GitHub https://github.com/non/algebra/pull/140#issuecomment-166394932.

denisrosset commented 8 years ago

@non, can we merge this ?

kailuowang commented 8 years ago

This would be a major breaking change for cats - I suspect that a large portion of cats users( me for sure) will have to change their code. How about we not include this in the next release which will be dependent by 0.5.0 cats release?

denisrosset commented 8 years ago

@kailuowang agree that the change is going to break existing code. That will be the case for me on the spire side if spire is merged back with algebra (around 20kloc to be precise).

However, the longer we wait, the more painful it's going to be for users of both libraries.

rklaehn commented 8 years ago

Agree with @denisrosset here. If we want interoperable typeclass based libraries, we need to agree on names. This was discussed at length, and everybody seemed to be OK with the choices. So now algebra just needs to do it.

The alternative is everybody doing his own thing, and the scala ecosystem not being viable for typeclass-based libraries. There is way too much fracturing already.

johnynek commented 8 years ago

Two ideas:

1) add an implicit enrichment inside object Monoid so that all Monoid instances get .empty that calls .neutral.

2) just suck it up and keep empty. No library is perfect and there kinds of changes push costs on users. They slow adoption of new versions and justify the fracturing that @rklaehn is speaking of.

I want better shared libraries for scala (I think it may mean we need to build source dependency mechanisms into sbt and those becoming the default, but another story).

I'd vote for 1, I'd support 2. I don't want to jam up users.

denisrosset commented 8 years ago

I'd vote for 2)

Let's have a default consistent terminology (empty, combine, remove), instead of the half-baked neutral.

And let's add enrichment methods in Spire.

non commented 8 years ago

@denisrosset Sounds good to me. Thanks all!

non commented 8 years ago

To be clear: we will keep empty and combine, and standardize Spire to those names (with aliases to our current names or vice versa).

non commented 8 years ago

(Also, I'm sorry that I have been absent from these conversations over the last few months.)