> Objects - which make verbs first class citizens (...)
There's much to be said for and against "objects" from philosophical, scientific, technological and engineering standpoints. Personally, I agree with the great men that think that object orientation is bullshit (torvalds, stepanov, pike, ...). Still, whatever you think about the appropriateness of objects, they do not make verbs first class citizens, but nouns!
Its been a while since I've gotten into the theory here. But ultimately an object is a set of data and mutators upon that data.
The Unix model does not link the two together - where for most hardware the two are inseparable. A sound card can only work on certain formats of data - it is more than mere bytes. It may have only limited processing ability (e.g. an EQ functionality or FM synthesizer). Ioctls are a hack around this - and of course they do "work" but they are not clean. They are also clearly not congruent with the Unix philosophy, you can't cleanly chain and pipe them or compose them into a larger whole.
NT did much better on this front, but much of the beauty is hidden by the horrid win32 layered on top. Cocoa is much nicer and probably the best real world example of how nice it can be when done right. You can use the UNIX APIs on a mac, but why would you want to?
> A sound card can only work on certain formats of data - it is more than mere bytes.
But you can keep this "data" that is only understandable by your sound card, and send it over the net, or compress it with gzip, or do whatever you want with it because, yes, it is merely bytes!
> You can use the UNIX APIs on a mac, but why would you want to?
because they are much more beautiful, and not a layered pile of unneeded abstractions.
Object orientation is to computer science what category theory is to mathematics. Yes, it is a very interesting intellectual exercise. Yes, it can be used to provide a foundation for everything. Yes, if you are using it daily in your work then you are either batshit crazy or severely misguided.
That's one of the more broad-sweeping statements I've come across. Object orientation is perfectly well-suited to every-day productive work of certain kinds. Just like most other programming methodologies.
There's much to be said for and against "objects" from philosophical, scientific, technological and engineering standpoints. Personally, I agree with the great men that think that object orientation is bullshit (torvalds, stepanov, pike, ...). Still, whatever you think about the appropriateness of objects, they do not make verbs first class citizens, but nouns!