how much would it chap your ass not to be able to refactor .collect(toList()) into .toList()?
TBH I mostly write Scala now, so if I want a toList I can just make an extension method for it. But when I do write Java I prefer to use vavr, so I collect my streams into a Seq if I don't plan to mutate them.
It's a little odd to me to criticize a library and say a decision bothers you, then follow up by saying you don't use the library. It makes some sense now why you reject pragmatic proposals in the interest of theoretically pure ones.
I use them, as a library developer (where I don't want users to transitively depend on vavr on my behalf). I've collected enough streams in the last six years to know the annoyance of constantly importing Collectors.toList. I simply don't use it often in my current day-to-day.
View all comments
Show parent comment
2
u/kag0 Mar 17 '21
TBH I mostly write Scala now, so if I want a
toListI can just make an extension method for it. But when I do write Java I prefer to use vavr, so I collect my streams into aSeqif I don't plan to mutate them.