3 ms·
I think most of the author's comments apply to the Win32 API in general. Windows game developers are probably among the few tech demographics that still have to
by markbnj 10y ago
I think most of the author's comments apply to the Win32 API in general. Windows game developers are probably among the few tech demographics that still have to encounter it on a regular basis. Having written an entire game to the Win16 API and then later ported it to Win32 I lost a significant chunk of my life spent in drilling into GDI and DirectDraw (I think that is what it was called then) structures and entrypoints. Pretty much the whole native API looks like his examples.
I also thought it was perhaps a tad strange to equate CSS, DirectShow, and the Android SDK as examples of tough "APIs" to master. I get his point, but those are three pretty wildly different levels of abstraction there.
- bluetomcat 10y agoWin32 API is the most horrendous collection of badly named, nonsensical types and functions I've ever encountered in my career. Back in the mid 90s I was learning how to program and understanding a Win32 "Hello world" was a royal pain compared to everything else I was doing. Functions with more than 8 parameters were the norm, structs with tens of members had to be manually initialised before calling them. And don't get me started on the WPARAM/LPARAM idiocy.
- markbnj 10y agoEasy to call it idiotic today, after twenty years of evolution, but it's a little silly to do so. The windows API was written in C, and as such they needed some way to accommodate multiple dispatch in the message loop using statically typed parameters. That same entry point handled literally hundreds of different message types for every operation in the system. From my perspective it was pretty well designed for its time.
- holmak 10y agoSDL is written in C, and it has a much more pleasant way of dealing with heterogeneous event types. There is a struct called SDL_Event, which you fill by calling SDL_PollEvent() until there are no more events to read. The struct is a (discriminated) union of all the possible event types. (It even wraps the Win32 API, so it is very directly comparable -- it is returning the same events!) https://wiki.libsdl.org/SDL_PollEvent https://wiki.libsdl.org/SDL_PollEvent