Abstraction layers: just say no.
I guess not a lot of people here have to deal with device driver programming but I guess abstraction layers can also apply in other cases.
Check out IOKit in Darwin. Apple has a very, very good set of abstraction layers in the Mac OS X kernel. You can literally subclass a base class for your particular type of device, fill in a couple methods, and have your basic functionality up and running in hours or days for common devices.
Do you think that's something that's only possible because the Mac supports a small subset of the hardware that the PC platform does? I'm not being funny, I genuinely don't know.
John Topley (www.johntopley.com)
You can't abstract locking? I dunno, aren't relational database transactions an abstraction over locking?
name withheld out of cowardice
IOKit dates back to NEXTSTEP, which did run on Intel hardware. It never supported the range of hardware that Windows did, but I think that was more a matter of limited market and resources than technical feasibility.
> Trying to adapt an abstraction layer to an OS that has a different semantic can be difficult and lead to nasty bugs.
Fog Creek Home