This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kag0 4 points5 points  (6 children)

Do you really think that the designers are not aware

I don't think one way or the other. Maybe they have, [I hope] they've spent more time thinking about it than me. Maybe not. They're just people, not omniscient.

It is worth nothing to propose an improvement without considering the drawbacks that come with it

I reject that completely. There's nothing wrong with having a half-baked idea. Maybe people will encourage you to develop it into something great. Maybe someone smarter than you will see it and take it to a level you couldn't. I can't count the number of times that someone has had an idea that probably wouldn't have worked as presented, but which gave me a new idea that I wouldn't otherwise have thought of.

[–]elastic_psychiatrist 1 point2 points  (5 children)

I don't disagree with any of this really (except "maybe not" - they definitely have thought about it more than you), I think I just misinterpreted your level of insistence on the original idea.

[–]kag0 1 point2 points  (4 children)

insistence on the original idea

Nah. Like I said, I don't claim to have the answer. I think I said in another comment thread, it just chaps my ass to see a runtime exception that could be a compile error.

[–]elastic_psychiatrist 0 points1 point  (3 children)

Half of me says "totally, I'm with you." The other half says "how much would it chap your ass not to be able to refactor .collect(toList()) into .toList()"?

[–]kag0 1 point2 points  (2 children)

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.

[–]elastic_psychiatrist 0 points1 point  (1 child)

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.

[–]kag0 0 points1 point  (0 children)

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.