4 ms·
What I mean with “object-oriented” vs “file-oriented” is more the philosophical approach of the systems. I think the “everything is a file” approach of UNIX has
by steve1977 3y ago
What I mean with “object-oriented” vs “file-oriented” is more the philosophical approach of the systems. I think the “everything is a file” approach of UNIX has its strengths but it also breaks down at some point.
So with the example of PowerShell (on Windows), I like that I can actually pass around objects which I then can query for details if I want to, but which can also hide their details if they’re not needed.
In contrast to files (or rather text), where details are always exposed. This is often seen as an advantage as it’s directly “human readable”, but in my experience it often makes for more complex command lines.
As said, both philosophies have their pros and cons, I just don’t see the UNIX one as the one and only truth.
But I generally try to be pragmatic and will happily use Windows or some UNIX derived system (or something else) depending on the use case.
- Ericson2314 3y agoI think Unix fails at "everything is a file" but that's actually good. When you say "pass around", what do you mean? Is this some userland struct future syscalls will inspect manipulate? Or are you passing HANDLE * references to an opaque resource? I very much agree text is bad. :)
- steve1977 3y agoI mean (for example) that in the shell I can pipe the output of one command to another, like on UNIX. But what gets passed is not text, but an object.