What is the disadvantage of having a standard GUI library for C ++?

To program the GUI in C ++, we can choose between too many libraries, such as Qt , Gtkmm , wxWidgets , FLTK , and there is one more that already exists: Nana .

The Nana C ++ library uses modern C ++ (C ++ 11) language features such as lambdas, templates, etc., and seems to be compatible with the standard C ++ library.

If the GUI library is 100% compatible with the standard C ++ library, then why can't we use it for the next C ++ standard (C ++ 14 or C ++ 17)?

What conditions are needed for a library in the C ++ standard library? if the conditions are not defined, then we are doomed to be in the black hole of the text forever, and it will hurt your heart! Otherwise, if the conditions are defined, then where can I request the library within the next C ++ standard?

+4
source share
2 answers

Bjarne Stroustrup has already answered this question:

Why doesn't C ++ have a GUI?

C ++ has many commercial and open source graphical interfaces (e.g. Gtkmm, SmartWin ++, V C ++ GUI, FLTK, and Qt). In particular, each platform provider provides a C ++ library to access their graphical interface. The problem is that it does not have a standard GUI, and this is a really serious problem. Note that providing a graphical interface is both a technical and a political issue. There are many graphical interfaces with a large number of users, and, as a rule, they would not want some other graphical interface to be declared standard. In any case, the standards committee does not have the resources to create a new and better graphical interface.

+8
source

How would you draw a button on a pacemaker?

You should have said:

or graphical programming for Windows or Linux in C ++, we can choose between too many libraries such as Qt, Gtkmm, wxWidgets, FLTK and there is another one that already exists: Nana.

C ++ is an agnostic of the operating system. Imagine how such a library will be supported on a platform that does not have gui at all. Like a microcontroller, or some kind of built-in piece of equipment.

Never say never, but I would never expect a GUI library like the ones you mentioned to be added to the C ++ standard.

If the GUI library is 100% compatible with the standard C ++ library, then why can't we use it for the next C ++ standard (C ++ 14 or C ++ 17)?

Because these GUI libraries also use platform and OS specific features to do what they do.

+4
source

Source: https://habr.com/ru/post/1491111/


All Articles