-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the usage of kind projections more consistent. #1079
Conversation
Hi @peterneyens, this seems OK to me. But would you mind distinguishing the type lambda parameters from normal types somehow? It's fine if we move away from greek letters but maybe we could use lowercase letters to help distinguish them? For example, we might write How do people feel about something like that? I'd also be fine using greek letters for the parameters (but using |
The type lambda parameters were indeed more easily visible with the Greek letters than with the upper-case letters. I don't mind lower casing or using Greek characters for the parameters, but I hope you don't mind me waiting on other opinions (doesn't make much sense doing this work twice 😄). |
Current coverage is 88.35%
@@ master #1079 diff @@
==========================================
Files 226 223 -3
Lines 2911 2808 -103
Methods 2859 2751 -108
Messages 0 0
Branches 49 52 +3
==========================================
- Hits 2587 2481 -106
- Misses 324 327 +3
Partials 0 0
|
A few comments ^^ was about the general usage of Greeks in general (My IDE can't, etc). Hence, if you use greeks for the parameters, you might as well use them for the lambda, too. One of my comments was they are confusing to newbies. Whilst I still hold to that, alot of that thought was based on code not using kind projector and using ascii symbols such as implicit def DisjunctionInstances1[L]: Traverse[({type l[a] = L \/ a})#l]
with Monad[({type l[a] = L \/ a})#l]
with Cozip[({type l[a] = L \/ a})#l]
with Plus[({type l[a] = L \/ a})#l]
with Optional[({type l[a] = L \/ a})#l]
with MonadError[\/, L] = new Traverse[({type l[a] = L \/ a})#l]
with Monad[({type l[a] = L \/ a})#l]
with Cozip[({type l[a] = L \/ a})#l]
with Plus[({type l[a] = L \/ a})#l]
with Optional[({type l[a] = L \/ a})#l] with MonadError[\/, L] { But as cats does not make heavy use of ascii symbols, and does use Kind projector, I must say that I prefer
to
Luckily, it's not my decision - tough one 😄 |
I'm pretty ambivalent as to whether greek letters are used or not, but I echo @non's request that type lambda parameters are clearly distinguishable from "normal" types. |
0bae06d
to
f52aa59
Compare
After the consensus on using Greek characters on gitter yesterday, I have changed this PR to use the The most important points for this decision are (if I summarized the discussion correctly) :
|
👍 Thanks for this @peterneyens, and also putting up with our flip-flopping! |
Unfortunately it looks like I just created a merge conflict by merging #1021. Sorry! I'll try to fix it ASAP. |
f52aa59
to
fb87999
Compare
I saw that one coming indeed 😄 because the I was also thinking that I could at a scalastyle regex check for |
Great. Thanks, @peterneyens! |
Like @inthenow said in #1069: it's probably better to be consistent in our kind projection syntax.
Since the
Lambda
syntax was used quite a lot more than theλ
syntax, I changed the occurrences of the last to the first.I have also replaced the last type lambdas in
TransLiftTests
by kind projections.