Closed konsumlamm closed 2 years ago
@lehins @Shimuuar what do you think?
@konsumlamm Just by itself it doesn't look too much different from before this PR, however if you can do this search and replace to \(\mathcal{O}(...)\)
instead, which is the way it is done in Data.List
, that would be awesome! What do you think?
Sure, I can do that.
It's perfectly valid and much more common to use O instead of \mathcal{O}
, which is a very recent innovation. All classic books from Knuth to Okasaki use an old plain O and I do not really see a good reason to diverge.
It's perfectly valid and much more common
This new big O typesetting is already used in base
haddock, and if we add this to vector
it'll make it pretty common in Haskell ecosystem.
which is a very recent innovation
Nothing is wrong with using innovations
All classic books from Knuth to Okasaki use an old plain O and I do not really see a good reason to diverge.
I see a reason. It looks pretty!
So @Bodigrim, we have a perfectly valid PR that I like and you don't, what do we do now? @Shimuuar any input?
Personally I would use plain O. Easier to type, easier to read in source. But I don't really have opinion about this. Either way is fine
Fair enough. Sorry @konsumlamm, despite that I am all for this cute big O, we live in a democracy with the other two maintainers, and both of them expressed preference in favor of the plain O
. If you'll able to persuade them, you have my vote, but for now I have to close this PR.
I did the following changes, via search & replace:
/O(1)/
->\(O(1)\)
/O(n)/
->\(O(n)\)
/O(m+n)/
->\(O(m+n)\)
/O(min(m,n))/
->\(O(\min(m,n))\)
/O(m+min(n1,n2))/
->\(O(m+\min(n_1,n_2))\)
Additionally i formatted complexities that previously had no formatting and some manual changes (see the second commit).