On 08/04/2009 14:34, Steven Schveighoffer wrote:

My experience with WMI is that it is buggy and very slow, not to mention
really complicated. I would hate to rely on it for scripting. On the
other hand, having everything as a file allows me to use all existing
file processing tools to deal with anything on a UNIX system. The file
API is simple and doesn't require me to look at an object spec to do
simple tasks.

well, WMI is supposed to be replaced and enhanced by powershell. So you should check that out. I agree that a uniform and consistent API is important and I'm sure that MS managed to mess that up :) but that's besides the point. "Everything is a file" does not provide a uniform API but rather provides no API. Each unix tool has its own mini-syntax and its own set of command-line arguments and you need to learn how to use each tool separately beyond trivial use cases. At my work, we program in a *nix environment (Solaris) and I also use Linux extensively So I know my way on *nix systems but I simply cannot remember all the different argument for each util. every time I need to find a file I need to ask a co-worker how to use "find". So in my experience there's nothing simple and uniform about unix tools and I use those constantly at work.

given that both options suck - I'd prefer dealing with objects rather than raw files that need to be parsed. i.e. someDir.list() which returns an array of files is better than using ls on unix.


Windows has a different design than Unix's "everything is a file"
which IMO is a stupid legacy design from the 70's.

The old "technology from the 70's" chestnut. Your opinion varies from
90% of people who actually use scripts. New technology for the sake of
being new isn't better.

Was Colombus wrong when he said the world is round and 99.9% of people told him he's a fool? My opinion is that there where better OS designs in the _60s_ than what we use today. "everything is a file" is a complete failure.

therefore, trying to do the unix way on windows with BAT files is
simply the wrong way. it doesn't work because it is not designed to
work like that.
my take on all this, I'm not a huge fan of windows and it sure has its
own problems, but this specific aspect is done much better than UNIX
and all those comments about "windows doesn't support unix's
"everything is a file" design and therefore it's crap" just show a lot
of ignorance.

It's not crap, just not as good. It's a poor replacement for the
"Everything is the same" design. Having everything use the same API has
huge advantages in modularity. One of my hugest pet peeves with Windows
is that it has several different APIs for I/O objects, and ony sockets
support the select interface. I have no idea what Windows devs were
smoking when they decided not to allow select on any object. Making
efficient I/O driven apps that use more than just sockets is really
difficult.

see above, MS got the it wrong. are you surprised? I'm not.

-Steve

Reply via email to