Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To be clear, I recognize that some kind of general mechanism is useful, I’m just not sure why files and byte streams are considered especially great.

Because the flip side of your example is that you now have a plain text protocol, and if you wanted to do anything else besides cat’ing it to the console, you’re now writing a parser.



> To be clear, I recognize that some kind of general mechanism is useful, I’m just not sure why files and byte streams are considered especially great.

It's one of the local maxima for generality. You could make everything an object or something, but it would require a lot of ecosystem work and eventually get you into a very similar place.

> Because the flip side of your example is that you now have a plain text protocol, and if you wanted to do anything else besides cat’ing it to the console, you’re now writing a parser.

Slight nuance: You could have everything-is-a-file without everything-is-text. Unix usually does both, and I think both are good, but eg. /dev/video0 is a file but not text. That said, text is also a nice local maxima, and the one that requires the least work to buy in to. Contrast, say, powershell, which does better... as long as your programs are integrated into that environment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: