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

Has there ever been a non Oop GUI toolkit in those days? Even Win32 was kinda "c with objects".



One of the interesting things about Apple vs. Microsoft in the early days was how differently the two companies handled the mindblow that was the GUI work at Xerox PARC.

Apple adopted the UI conventions, and refined, polished, and extended them to create first the Lisa system and then the Mac. But early Mac OS ("System" in those days) was very much based on a procedural, Pascal-based API without much in the way of object orientation. Your app had to handle the close button and the resize grabber itself, for instance -- actually listen for mouse events, determine if there was a click in the appropriate region, and close the window or buzz in a loop drawing the resize rectangle. Utility functions were provided to help with this process, but it still had to be part of your main loop. Dialog boxes were defined with Pascal records.

Microsoft, by contrast, hired some of the Xerox PARC engineers away -- guys like Charles Simonyi. The design of Windows reflects this, as Windows more closely reflects the Xerox PARC work at an architectural level. It had from the very earliest days something like an object system. A window belonged to a window class, which contained a single method (the window procedure or WndProc), that processed messages from a flexible and extensible message system. Windows could even be "subclassed" by substituting a different window procedure. This more flexible design allowed the system to provide the necessary decorations (minimize and maximize buttons, a system menu, resize grips and even scrollbars) and the client window would receive messages from them to let it know that, for example, it had been resized or scrolled. The actual mechanics of how these decorations worked could be delegated to the system. The API was still in C, not OO like we know it today, and was a bit cumbersome to use -- but it had more of those object-oriented ideas than early Mac did.

Of course, Steve Jobs didn't make the same mistake twice, and for his first post-Mac system, NeXT, he had it based all around object orientation.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: