News for hackers. Stuff that matters.
Re:Introduction to SerenityOS Programming by axilmar on Wednesday March 04, 2020 @04:58AM (#22482474)
Very nice and clean GUI library.

Clean GUI C++ libraries like this always make me think that Microsoft deliberately chose to not implement such a nice C++ GUI API for Windows and instead gave us the horrible MFC in order to lock us in into Visual Basic and other proprietary projects.

If Microsoft had given us a clean C++ API for Windows, the world of programming would be very different today.

Re:Introduction to SerenityOS Programming by speedplane on Wednesday March 04, 2020 @05:03AM (#22482499)
> If Microsoft had given us a clean C++ API for Windows, the world of programming would be very different today.

I mean, Win32 was a relatively clean C library. Not beautiful by any means, but it worked and was well documented. At the time it was huge, but it's pretty irrelevant today. If they did it in C++ instead of C, how could it have been different.

Re:Introduction to SerenityOS Programming by axilmar on Wednesday March 04, 2020 @05:20AM (#22482580)
I wouldn't call the Win32 API clean. To me, it's one of the worst APIs I have ever encountered.

It worked and it was well documented, but that does not mean its design is very nice. To me, that is.

Re:Introduction to SerenityOS Programming by highspeedmobile on Wednesday March 04, 2020 @07:50AM (#22483274)
There would be no surprise to this since the Win32 GUI APIs were created at a time when C++0x was widely used compared to what you see with APIs created in C++11 and onwards.

I guess the latter is the case for SerenityOS and other OSes with integrated GUIs.

Re:Introduction to SerenityOS Programming by akling on Wednesday March 04, 2020 @08:04AM (#22483379)
Indeed, SerenityOS has been using C++17 from the start, and will be using any helpful C++20 features as soon as they are available in compilers. We're already using templated lambdas in a couple of places :)
Re:Introduction to SerenityOS Programming by axilmar on Thursday March 05, 2020 @04:13AM (#22492094)
The Win32 API could have been much better designed even if done in plain C. The problems the Win32 API are basic, and can be solved in any language that provides minimal facilities.