Reason #55234 that Windows sucks

I’ve been porting some Windows code to Mac OS X for the last few weeks, which involves converting Windows API calls to the equivalent functionality in OS X.

The thing that really annoys me about Windows programming is that every function takes a HANDLE, which can be a window, communication channel, file reference, or any number of other things. There’s no type safety, so you can’t tell if you’re passing the wrong type of handle until it barfs at runtime.

In Mac OS X, even though most Core Foundation functions take some kind of CFTypeRef, all of the functions are defined as using a specific class, so you’ll get a compiler warning if you use the wrong type.

1 thought on “Reason #55234 that Windows sucks”

Leave a Comment