Daniel-Diaz / matrix

A Haskell native implementation of matrices and their operations.
BSD 3-Clause "New" or "Revised" License
35 stars 31 forks source link

Conflict with Alternative's <|> #41

Open istathar opened 8 years ago

istathar commented 8 years ago

I'm sure you're aware, but an operator named <|> is a part of the Alternative typeclass from Control.Applicative. Since that's in base now, I don't think it's wise for matrix to export a function with the same name for joining blocks.

Not the end of the world.

octopuscabbage commented 8 years ago

Any proposals as to what it's changed to?

Daniel-Diaz commented 8 years ago

Right, <|> was a terrible name to choose. We need to change it. I'm happy to see your suggestions. Maybe <||>? The issue with this is backwards compatibility. We should first make a release with both the old and the new name, with the old being marked as deprecated.

octopuscabbage commented 8 years ago

Seems like the best alternative (no pun intended) I did some Googling and couldn't find a better looking operator. Would we change the vertical join?

istathar commented 8 years ago

If two lines is your thing, then <=>?

Personally I would just have gone with

one
`above`
two

and

three `beside` four

but that's just me. :)

octopuscabbage commented 8 years ago

Yeah, the fact that we can't really come up with a good operator makes me think that concatenation isn't really worth an operator. I think your suggestion of above and beside is fine, except it looks kind of weird not infix. Maybe verticalConcat and horizontalConcat or something.

istathar commented 7 years ago

@Daniel-Diaz do you want to make a decision about this, or are you waiting for a patch before passing judgment?