this post was submitted on 25 Sep 2024
886 points (87.6% liked)

Programmer Humor

19602 readers
958 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] frezik@midwest.social 6 points 1 month ago (1 children)

BufferedReader cannot accept file name because it makes arbitrary reader… well buffered. It’s not BufferedFileReader, even that would accept something like Path or File, not string, because File can be remote file, should Reader now know all possible local and remote protocols and path formats? What else it must do?

You're just describing the problem. Yes, I see where they're going with this. It's still a usability nightmare. I can't think of another language that makes you jump through hoops like this on IO, and they get along fine without it.

[–] PlexSheep@infosec.pub 2 points 1 month ago

I agree with you. It's a neat design idea to make things a bit more maintainable perhaps, but it's just annoying to program with.