Incidentally, this is node.js' model.
Same problem applies to one of Plan 9's key design features: private namespaces.
I'll quote jwz: "Convenient though it would be if it were true, Mozilla is not big because it's full of useless crap. Mozilla is big because your needs are big. Your needs are big because the Internet is big. There are lots of small, lean web browsers out there that, incidentally, do almost nothing useful. If that's what you need, you've got options... "
"Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs from their native Plan 9 environment to Unix-like operating systems."
and 9base:
http://tools.suckless.org/9base
"9base is a port of various original Plan 9 tools for Unix, based on plan9port."
Unix said that, but in fact meant "everything has a unique descriptor associated (an integer)".
Directory is not a file, it's a set of files and other directories. Unix doesn't even tries to camouflage this simple observation and returns EISDIR.
Adding sockets and windows outside the filesystem is one of the things Rob is specifically complaining about here, and in fact complained about at the time as well.
oh yes that is so elegant...
Same argument goes for find. Its usefulness compared to du justifies its existence.