Hacker News new | past | comments | ask | show | jobs | submit login

In the early days there was little need, nothing big enough to need that many would fit in the rest of the machine anyway.

Also they were global so apps could communicate - the message queue was based on sending things to window handles, and the more advanced IPC methods like DDE and so forth were built on that. It is also how anything that interested with the task list or interacted with the desktop (adding decorations to windows etc.) functioned. This doesn't work if local handles can conflict with those in the other app.

The amount of things that depended on HWNDs working this way is probably a significant part of why large chunks of GDI remained 16-bit in Windows95 despite things like the limit of 16,384 handles being an issue you could run into relatively easily by that point - too many existing apps & tools would have broken otherwise and limited people's desire to upgrade from 3.x.

So a combination of "no point introducing extra complexity, at least early on", "the global pool is actually useful", and "once it was done that way, it was very hard to refactor without breaking compatibility with much of the existing application base".

I think the compatibility layers on later versions did start separating the apps more, once breaking things was less of an issue (new versions existed that were directly compatible with newer APIs) so segregating the apps for stability reasons won out over being quite as backward compatible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: