Conform foreach tparam to majority naming convention#4803
Conform foreach tparam to majority naming convention#4803SethTisue merged 1 commit intoscala:2.11.xfrom
Conversation
|
This was originally part of a larger PR. It started life as #4651. This commit is mainly about the Review by @adriaanm, @SethTisue, @som-snytt, @Ichoran, @jvican. |
|
LGTM I first noticed this convention in |
There was a problem hiding this comment.
could you either take this out, or bring aggregate in ParIterableLike.scala in line as well (and update the commit message)? either way. (nbd, but having spotted it, might as well point it out.)
There was a problem hiding this comment.
All the par type params were especially creatively non-conformist, as I recall from when I peeked under that hood/bonnet. It's too bad Dr Odersky didn't ask for straw man proposals for type param conventions for collections. Lets settle the fundamentals first, before building castles in the sky.
'U' is the common choice for the foreach function result tparam.
This command summarises the naming diversity before and after this change.
$ fgrep -r 'def foreach[' *|cut -f2 -d:|cut -f1 -d'('|tr -s ' '|sed 's/override //g'|sort|uniq -c|sort -nr
Before,
80 def foreach[U]
6 def foreach[C]
6 def foreach[B]
4 final def foreach[U]
3 def foreach[S]
2 inline final def foreach[U]
2 def foreach[A]
1 inline final def foreach[specialized
1 final def foreach[B]
1 * def foreach[U]
1 def foreach[Q]
1 def foreach[D]
1 def foreach[A,B,U]
After,
98 def foreach[U]
5 final def foreach[U]
2 inline final def foreach[U]
1 inline final def foreach[specialized
1 * def foreach[U]
1 def foreach[A,B,U]
(@ symbols removed.)
c596533 to
6ed7010
Compare
|
LGTM assuming Jenkins signs off |
|
LGTM |
|
#4760 can be rebased and taken off on-hold following the merge of this. |
Conform foreach tparam to majority naming convention
|
thank you Janek! |
'U' is the common choice for the foreach function result tparam.
This command summarises the naming diversity before and after this change.
$ fgrep -r 'def foreach[' *|cut -f2 -d:|cut -f1 -d'('|tr -s ' '|sed 's/override //g'|sort|uniq -c|sort -nr
Before,
After,
(@ symbols removed.)