Re: Would it be possible that gtk implementation in C++






On Thu, Aug 7, 2014 at 10:06 PM, 黄羽众 <ihyzi 163 com> wrote:
Thank you for point out predecessors' question!

I read the question and get some points, but I thinks the situtations change a lot and I am not ask the same question.

1. I am not ask for why GTK choose to implement in C, I know it have some historical reason. I want to make a proposal that gtk could be re-written with c++ just as GCC does. I want to discuss with you whether it is a good idea.

yet somehow you missed the most critical reason. historically, perhaps, one could consider that things like pygtk did not exist. currently they do. creating such bindings with the core implementation in C++ is challenging. thus the sort of move you are suggesting would make the continued support of languages like python more difficult.

in addition, you seem concerned about app developers, but app developers do not (as a rule) develop Gtk+. They develop their own apps, and they are free to use gtkmm, just as I've done with Ardour for the last 12 years. Do I care that "in fact" Gtk+ is implemented in C? Well, yes, a bit but that is mostly because I have a very demanding application and portability goals that force me to occasionally work on Gtk+ itself. If I were writing a simpler application (and other than a modern web browser or a kernel, almost all apps are simpler than Ardour :), gtkmm would be entirely adequate and as an app developer, I would be using a C++ GUI toolkit. And if I wanted to write my own new widgets, I could, and do it much more easily than in C. You say:
 
. Although there are gtkmm available, but gtkmm didn't gain enough official support and recommend as GTK, and much fewer reference, help, support available. The official recommand is gtk in c rather than gtkmm in c++, so many devlopers read some tutorials and feel threatened and leave. What's worse, gtkmm didn't wrapper all of the gtk featurese. In some complex cases, developers have to use the low level gobj pointer to get things done.

ALthough the final point is true, it isn't common. As for documentation and the rest, I've always found that once I made the decision to use gtkmm, what existed was adequate (support, tutorials, etc).
 
Now is in 2014, It can't be more normal to develop GUI application with OOP style. I think it's time to change.

If you're really so concerned with it being 2014, I'm not sure why you're considering using Gtk+ at all. I don't have an alternative to suggest, but it is a remarkably dated GUI toolkit in many ways. Not all though.
 

GTK could be rewritten in C++,

But will not be. Find something more productive to put your energy into.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]