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

2014-08-12 Thread Lucas
For me, one of the most important GTK+ features is that it is
implemented in plain C. This simplifies its usage from other languages
(Lua, Go, C#, Rust, etc) as it is much more easy to have a C FFI than
a C++ FFI. For those who want to program with GTK+ with a C++
interface, there is gtkmm already.

On Mon, Aug 11, 2014 at 8:04 AM, Marcus Karlsson  wrote:
> On Fri, Aug 08, 2014 at 10:06:28AM +0800, 黄羽众 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.
>
> It's of course possible from an academic perspective, even though as a
> lot of people have already said it would not be very practical. My
> suggestion is that anyone who wants to go forward with this makes a fork
> and works on it, with no expectations that it would ever be merged back.
> Take the opportunity to break the ABI and make a new great GTK+ inspired
> toolkit. If it's good then people will adopt it.
>
>> 2. Situations change a lot. Back to the time GTK was born, C++ is also very 
>> primitive so the developers would rather implement an object-system by hand. 
>> But nowadays C++ is stable and have many cool features especially in C++11 
>> and the in-coming C++14. C++'s object-system is becoming more and more 
>> complete and add many useful features in GUI development such as exception, 
>> multi-threads and so on. I think due to the same reason did GCC turn to C++.
>
> C is not updated as rapidly as C++ but it is modernized occasionally.
> Support for multi threading is for example an optional part of C11.
> This doesn't really matter too much for GTK+ though since it uses Glib.
>
>> 3. Now, from the view of app developers, who are very likely learned 
>> C/C++/Java in classes, and learn Python/JS/PHP/Nodejs after class. And very 
>> probably have experiences coding with QT, HTML5, Android. They can't be more 
>> familiar with OOP and C++. But when they turn to GTK, they have to expand 
>> one line in C++ into three or more lines in C. This will threaten many 
>> developers. 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.
>
> If the impression that developers get is that they have to use C or that
> they are strongly recommended to use C; then that sounds like a problem
> with the documentation.
>
>> Now is in 2014, It can't be more normal to develop GUI application with OOP 
>> style. I think it's time to change.
>
> GTK+ is already object oriented, and good GTK+ applications are often
> that as well even when they are written in C. You don't need support for
> object orientation in the language in order to use object orientated
> design.
>
>> GTK could be rewritten in C++, and what's more important, GTK should 
>> officially recommend to develop apps in C++, which can't be more familiar to 
>> GUI developers.
>
> The GTK+ project web site already says on its first page that while the
> toolkit itself is written in C it also supports a wide range of other
> languages. That's fairly official to me.
>
> Marcus
>
> [1] http://www.gtk.org/
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list



-- 
http://oproj.tuxfamily.org
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-11 Thread Marcus Karlsson
On Fri, Aug 08, 2014 at 10:06:28AM +0800, 黄羽众 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.

It's of course possible from an academic perspective, even though as a
lot of people have already said it would not be very practical. My
suggestion is that anyone who wants to go forward with this makes a fork
and works on it, with no expectations that it would ever be merged back.
Take the opportunity to break the ABI and make a new great GTK+ inspired
toolkit. If it's good then people will adopt it.

> 2. Situations change a lot. Back to the time GTK was born, C++ is also very 
> primitive so the developers would rather implement an object-system by hand. 
> But nowadays C++ is stable and have many cool features especially in C++11 
> and the in-coming C++14. C++'s object-system is becoming more and more 
> complete and add many useful features in GUI development such as exception, 
> multi-threads and so on. I think due to the same reason did GCC turn to C++.

C is not updated as rapidly as C++ but it is modernized occasionally.
Support for multi threading is for example an optional part of C11.
This doesn't really matter too much for GTK+ though since it uses Glib.

> 3. Now, from the view of app developers, who are very likely learned 
> C/C++/Java in classes, and learn Python/JS/PHP/Nodejs after class. And very 
> probably have experiences coding with QT, HTML5, Android. They can't be more 
> familiar with OOP and C++. But when they turn to GTK, they have to expand one 
> line in C++ into three or more lines in C. This will threaten many 
> developers. 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.

If the impression that developers get is that they have to use C or that
they are strongly recommended to use C; then that sounds like a problem
with the documentation.

> Now is in 2014, It can't be more normal to develop GUI application with OOP 
> style. I think it's time to change.

GTK+ is already object oriented, and good GTK+ applications are often
that as well even when they are written in C. You don't need support for
object orientation in the language in order to use object orientated
design.

> GTK could be rewritten in C++, and what's more important, GTK should 
> officially recommend to develop apps in C++, which can't be more familiar to 
> GUI developers.

The GTK+ project web site already says on its first page that while the
toolkit itself is written in C it also supports a wide range of other
languages. That's fairly official to me.

Marcus

[1] http://www.gtk.org/
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-09 Thread narcisse doudieu siewe


search for gtkmm it is the c++ binding for gtk.



Le Samedi 9 août 2014 15h12, richard boaz  a écrit :
 


i'm confused...

if you think it's such a good idea, why don't you do it yourself?  or, rather, 
why do you expect others to do it for you?  

or are you another one of many who thinks that software simply magically 
"appears" free of charge when someone asks for it?

so, please go do it yourself and report back when you're ready for delivery.

good luck,

r-





On Sat, Aug 9, 2014 at 9:41 AM, 黄羽众  wrote:

I heard Vala before and I read the tutorial and some sample code of Vala today.
>
>
>Silence...
>
>
>Another C++--, I have to say.
>
>
>Excuse for my unpolite, I can't find any point that interest me,
>the highlights it describes is very common in many existing OOP language.
>
>
>And the only point I remember is its ABI compatible with C, which also limit 
>its language possibility.
>
>
>I think it's would rather better to spend time solving the problem like gtkmm 
>can't provide a function like "builder.signal_connect(this)" to auto connect 
>the signals defined in glade XML files rather than start another project to 
>reinvent the wheel. 
>
>
>Sorry again, I am a bit excited.
>
>
>
>
>
>在 2014-08-09 04:14:29,"Robert Schroll"  写道:
>On Fri, Aug 8, 2014 at 12:04 PM, 黄羽众  wrote:
>> Compare to many people here, I am freshman in GTK/GTKmm. I make this 
>> proposal just because sometimes I miss the day when I am using 
>> QT/Android/HTML5.
>
>In that case, I'd suggest you take a look at Vala [1,2].  Vala is a new 
>language, reminiscent of C# and Java, that's built around the GObject 
>system that's at the heart of GTK.  This means that there's no 
>impedance mismatch between the language's object system and GTK 
>objects.  It handles memory management for you (though you can play 
>with pointers if you really want).  It compiles to C, so it'll run 
>everywhere.
>
>I've been using Vala for only a little while, but I'm thoroughly 
>impressed.  Give it a look.
>
>Robert
>
>[1] https://wiki.gnome.org/Projects/Vala >[2] 
>https://wiki.gnome.org/Projects/Vala/ValaForJavaProgrammers > 
>
>
>___
>gtk-list mailing list
>gtk-list@gnome.org
>https://mail.gnome.org/mailman/listinfo/gtk-list
>
>


___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-09 Thread richard boaz
i'm confused...

if you think it's such a good idea, why don't you do it yourself?  or,
rather, why do you expect others to do it for you?

or are you another one of many who thinks that software simply magically
"appears" free of charge when someone asks for it?

so, please go do it yourself and report back when you're ready for delivery.

good luck,

r-




On Sat, Aug 9, 2014 at 9:41 AM, 黄羽众  wrote:

> I heard Vala before and I read the tutorial and some sample code of Vala
> today.
>
> Silence...
>
> Another C++--, I have to say.
>
> Excuse for my unpolite, I can't find any point that interest me,
> the highlights it describes is very common in many existing OOP language.
>
> And the only point I remember is its ABI compatible with C, which also
> limit its language possibility.
>
> I think it's would rather better to spend time solving the problem like
> gtkmm can't provide a function like "builder.signal_connect(this)" to auto
> connect the signals defined in glade XML files rather than start another
> project to reinvent the wheel.
>
> Sorry again, I am a bit excited.
>
>
>
>
> 在 2014-08-09 04:14:29,"Robert Schroll"  写道:
> >On Fri, Aug 8, 2014 at 12:04 PM, 黄羽众  wrote:
> >> Compare to many people here, I am freshman in GTK/GTKmm. I make this
> >> proposal just because sometimes I miss the day when I am using
> >> QT/Android/HTML5.
> >
> >In that case, I'd suggest you take a look at Vala [1,2].  Vala is a new
> >language, reminiscent of C# and Java, that's built around the GObject
> >system that's at the heart of GTK.  This means that there's no
> >impedance mismatch between the language's object system and GTK
> >objects.  It handles memory management for you (though you can play
> >with pointers if you really want).  It compiles to C, so it'll run
> >everywhere.
> >
> >I've been using Vala for only a little while, but I'm thoroughly
> >impressed.  Give it a look.
> >
> >Robert
> >
> >[1] https://wiki.gnome.org/Projects/Vala
> >[2] https://wiki.gnome.org/Projects/Vala/ValaForJavaProgrammers
> >
>
>
>
>
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-08 Thread Robert Schroll

On Fri, Aug 8, 2014 at 12:04 PM, 黄羽众  wrote:
Compare to many people here, I am freshman in GTK/GTKmm. I make this 
proposal just because sometimes I miss the day when I am using 
QT/Android/HTML5.


In that case, I'd suggest you take a look at Vala [1,2].  Vala is a new 
language, reminiscent of C# and Java, that's built around the GObject 
system that's at the heart of GTK.  This means that there's no 
impedance mismatch between the language's object system and GTK 
objects.  It handles memory management for you (though you can play 
with pointers if you really want).  It compiles to C, so it'll run 
everywhere.


I've been using Vala for only a little while, but I'm thoroughly 
impressed.  Give it a look.


Robert

[1] https://wiki.gnome.org/Projects/Vala
[2] https://wiki.gnome.org/Projects/Vala/ValaForJavaProgrammers

___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-08 Thread 黄羽众
Thanks for all of the replies. I learnd a lot from it.

Compare to many people here, I am freshman in GTK/GTKmm. I make this proposal 
just because sometimes I miss the day when I am using QT/Android/HTML5.

Now I will put these toolkits into the fields they athlete at. Each of them 
could be great, in diffinerent situation, different goal, even in different 
philosophy.

Thanks again, I will continue learning GTK/GTKmm.


Sent from MEIZU MX

 Original Message 
From:Paul Davis 
Time:Fri 8/8 22:47
To:黄羽众 
Cc:Florian Pelz ,gtk-list@gnome.org
Subject:Re: Would it be possible that gtk implementation in C++

>On Thu, Aug 7, 2014 at 10:06 PM, 黄羽众  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.
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-08 Thread Paul Davis
On Thu, Aug 7, 2014 at 10:06 PM, 黄羽众  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.
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-07 Thread Daniel Kasak
In my experience, people get quite fond of a language, and this fondness is
a MAJOR reason why a small development team will never rewrite their large
project in some other language that some random person requests they drop
everything and port to. There are other reasons of course, like the
monumental task, years of ironing out bugs, zero gains and substantial
losses. People sometimes ask me why I don't rewrite my Perl projects in
Python or PHP ( or why I don't port to framework xyz or whatever ), and I
always invite them to do such a port and maintain it, but I'm personally
not interested in it at all, and will continue hacking in Perl.

I've observed that most Linux software is written in C. For this reason,
I've done some C hacking myself, knowing that what I learn I can then apply
to a large majority of the software I'd be interested in working on. It's
really only QT / KDE that are written in C++, as far as I can tell. It was
news to me that gcc have shifted to C++. Damn it, that means I'll have to
stick with an old compiler for the next 3 years until it stabalises :/
Anyway I've never considered learning C++, as it just doesn't seem to have
much penetration in the circles that I'm interested in.

That's the psychological answer that I believe would apply to a large
majority of people you're asking.

Linus' take on C vs C++, for some light humour:
http://harmful.cat-v.org/software/c++/linus


Dan


On Fri, Aug 8, 2014 at 12:39 PM, Jasper St. Pierre 
wrote:

> Rewriting a widely-used library in a new language, breaking all APIs, is
> not a good idea when we're already struggling to maintain our current
> codebase. Regardless of whether you like C++ or not, this isn't going to
> happen. Sorry.
>
>
> On Thu, Aug 7, 2014 at 10:06 PM, 黄羽众  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.
>>
>> 2. Situations change a lot. Back to the time GTK was born, C++ is also
>> very primitive so the developers would rather implement an object-system by
>> hand. But nowadays C++ is stable and have many cool features especially in
>> C++11 and the in-coming C++14. C++'s object-system is becoming more and
>> more complete and add many useful features in GUI development such as
>> exception, multi-threads and so on. I think due to the same reason did GCC
>> turn to C++.
>>
>> 3. Now, from the view of app developers, who are very likely learned
>> C/C++/Java in classes, and learn Python/JS/PHP/Nodejs after class. And very
>> probably have experiences coding with QT, HTML5, Android. They can't be
>> more familiar with OOP and C++. But when they turn to GTK, they have to
>> expand one line in C++ into three or more lines in C. This will threaten
>> many developers. 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.
>>
>>
>> Now is in 2014, It can't be more normal to develop GUI application with
>> OOP style. I think it's time to change.
>>
>> GTK could be rewritten in C++, and what's more important, GTK should
>> officially recommend to develop apps in C++, which can't be more familiar
>> to GUI developers.
>>
>>
>> Sent from MEIZU MX
>>
>>  Original Message 
>> From:Florian Pelz 
>> Time:Fri 8/8 05:23
>> To:gtk-list@gnome.org
>> Subject:Re: Would it be possible that gtk implementation in C++
>>
>> >Hi,
>> >
>> >Someone asked this question on Stackoverflow:
>> >
>> http://stackoverflow.com/questions/9747468/why-was-the-gobject-system-created
>> >I think they answer it pretty well. Also, C is much closer to the
>> >hardware and GCC's error messages for C++ are not that great.
>> >
>> >On 08/07/2014 10:49 PM, Dub wrote:
>> >> tbh, the only reason I use GTK is because it is C.
>> >>
>> >> While C++ is probably a better choice. C allows you to easier
>> >> integrate it with pretty much any language of your choosing easily
>> >> (Vala, Ruby, PHP (lol), Python, Rust, Go, Perl, Lua, Javascript, etc)
>> >> that in itself is a really good reason.
>> >>
>> >>
>> >> On Thu, Aug 7, 2014 at 12:22 PM, 黄羽众 > >> > wrote:
>> >>
>> >> For the past few time, I am using gtkmm to development GUI
>> >> application, and I am really enjoy it.
>> >>
>> >> I know that choose C as its implementation language makes gtk gain
>> >

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

2014-08-07 Thread Jasper St. Pierre
Rewriting a widely-used library in a new language, breaking all APIs, is
not a good idea when we're already struggling to maintain our current
codebase. Regardless of whether you like C++ or not, this isn't going to
happen. Sorry.


On Thu, Aug 7, 2014 at 10:06 PM, 黄羽众  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.
>
> 2. Situations change a lot. Back to the time GTK was born, C++ is also
> very primitive so the developers would rather implement an object-system by
> hand. But nowadays C++ is stable and have many cool features especially in
> C++11 and the in-coming C++14. C++'s object-system is becoming more and
> more complete and add many useful features in GUI development such as
> exception, multi-threads and so on. I think due to the same reason did GCC
> turn to C++.
>
> 3. Now, from the view of app developers, who are very likely learned
> C/C++/Java in classes, and learn Python/JS/PHP/Nodejs after class. And very
> probably have experiences coding with QT, HTML5, Android. They can't be
> more familiar with OOP and C++. But when they turn to GTK, they have to
> expand one line in C++ into three or more lines in C. This will threaten
> many developers. 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.
>
>
> Now is in 2014, It can't be more normal to develop GUI application with
> OOP style. I think it's time to change.
>
> GTK could be rewritten in C++, and what's more important, GTK should
> officially recommend to develop apps in C++, which can't be more familiar
> to GUI developers.
>
>
> Sent from MEIZU MX
>
>  Original Message 
> From:Florian Pelz 
> Time:Fri 8/8 05:23
> To:gtk-list@gnome.org
> Subject:Re: Would it be possible that gtk implementation in C++
>
> >Hi,
> >
> >Someone asked this question on Stackoverflow:
> >
> http://stackoverflow.com/questions/9747468/why-was-the-gobject-system-created
> >I think they answer it pretty well. Also, C is much closer to the
> >hardware and GCC's error messages for C++ are not that great.
> >
> >On 08/07/2014 10:49 PM, Dub wrote:
> >> tbh, the only reason I use GTK is because it is C.
> >>
> >> While C++ is probably a better choice. C allows you to easier
> >> integrate it with pretty much any language of your choosing easily
> >> (Vala, Ruby, PHP (lol), Python, Rust, Go, Perl, Lua, Javascript, etc)
> >> that in itself is a really good reason.
> >>
> >>
> >> On Thu, Aug 7, 2014 at 12:22 PM, 黄羽众  >> > wrote:
> >>
> >> For the past few time, I am using gtkmm to development GUI
> >> application, and I am really enjoy it.
> >>
> >> I know that choose C as its implementation language makes gtk gain
> >> a wonderful performance,
> >> but recently GCC turn to C++.
> >> https://gcc.gnu.org/gcc-4.8/changes.html
> >>
> >> I think that as a complier which have to think a lot about
> >> performance, it turn to C++ for code elegance and development speed,
> >> a GUI application have no reason to continue using C stuff.
> >>
> >> Actually gtk implement a object system as its essential part, that
> >> did prove that GUI application need a object-oriented design.
> >> And C++ could provide this as a language level feaure, needless to
> >> implement it in application code.
> >>
> >> So I suggest that it is possible to develop gtk in c++ as
> >> main-line support?
> >>
> >> Unlike gtkmm, which is just a wrapper from c++ to c, turn to c++
> >> in main-line means a lot.
> >>
> >> GCC choose this and get good result, I think gtk could have a try.
> >>
> >>
> >>
> >> ___
> >> gtk-list mailing list
> >> gtk-list@gnome.org 
> >> https://mail.gnome.org/mailman/listinfo/gtk-list
> >>
> >>
> >>
> >>
> >> ___
> >> gtk-list mailing list
> >> gtk-list@gnome.org
> >> https://mail.gnome.org/mailman/listinfo/gtk-list
> >
> >
> >___
> >gtk-list mailing list
> >gtk-list@gnome.org
> >https://mail.gnome.org/mailman/listinfo/gtk-list
>
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gno

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

2014-08-07 Thread 黄羽众
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.

2. Situations change a lot. Back to the time GTK was born, C++ is also very 
primitive so the developers would rather implement an object-system by hand. 
But nowadays C++ is stable and have many cool features especially in C++11 and 
the in-coming C++14. C++'s object-system is becoming more and more complete and 
add many useful features in GUI development such as exception, multi-threads 
and so on. I think due to the same reason did GCC turn to C++.

3. Now, from the view of app developers, who are very likely learned C/C++/Java 
in classes, and learn Python/JS/PHP/Nodejs after class. And very probably have 
experiences coding with QT, HTML5, Android. They can't be more familiar with 
OOP and C++. But when they turn to GTK, they have to expand one line in C++ 
into three or more lines in C. This will threaten many developers. 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.


Now is in 2014, It can't be more normal to develop GUI application with OOP 
style. I think it's time to change.

GTK could be rewritten in C++, and what's more important, GTK should officially 
recommend to develop apps in C++, which can't be more familiar to GUI 
developers.


Sent from MEIZU MX

 Original Message 
From:Florian Pelz 
Time:Fri 8/8 05:23
To:gtk-list@gnome.org
Subject:Re: Would it be possible that gtk implementation in C++

>Hi,
>
>Someone asked this question on Stackoverflow: 
>http://stackoverflow.com/questions/9747468/why-was-the-gobject-system-created
>I think they answer it pretty well. Also, C is much closer to the 
>hardware and GCC's error messages for C++ are not that great.
>
>On 08/07/2014 10:49 PM, Dub wrote:
>> tbh, the only reason I use GTK is because it is C.
>>
>> While C++ is probably a better choice. C allows you to easier 
>> integrate it with pretty much any language of your choosing easily 
>> (Vala, Ruby, PHP (lol), Python, Rust, Go, Perl, Lua, Javascript, etc) 
>> that in itself is a really good reason.
>>
>>
>> On Thu, Aug 7, 2014 at 12:22 PM, 黄羽众 > > wrote:
>>
>> For the past few time, I am using gtkmm to development GUI
>> application, and I am really enjoy it.
>>
>> I know that choose C as its implementation language makes gtk gain
>> a wonderful performance,
>> but recently GCC turn to C++.
>> https://gcc.gnu.org/gcc-4.8/changes.html
>>
>> I think that as a complier which have to think a lot about
>> performance, it turn to C++ for code elegance and development speed,
>> a GUI application have no reason to continue using C stuff.
>>
>> Actually gtk implement a object system as its essential part, that
>> did prove that GUI application need a object-oriented design.
>> And C++ could provide this as a language level feaure, needless to
>> implement it in application code.
>>
>> So I suggest that it is possible to develop gtk in c++ as
>> main-line support?
>>
>> Unlike gtkmm, which is just a wrapper from c++ to c, turn to c++
>> in main-line means a lot.
>>
>> GCC choose this and get good result, I think gtk could have a try.
>>
>>
>>
>> ___
>> gtk-list mailing list
>> gtk-list@gnome.org 
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>>
>>
>>
>>
>> ___
>> gtk-list mailing list
>> gtk-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>
>___
>gtk-list mailing list
>gtk-list@gnome.org
>https://mail.gnome.org/mailman/listinfo/gtk-list
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-07 Thread Florian Pelz

Hi,

Someone asked this question on Stackoverflow: 
http://stackoverflow.com/questions/9747468/why-was-the-gobject-system-created
I think they answer it pretty well. Also, C is much closer to the 
hardware and GCC's error messages for C++ are not that great.


On 08/07/2014 10:49 PM, Dub wrote:

tbh, the only reason I use GTK is because it is C.

While C++ is probably a better choice. C allows you to easier 
integrate it with pretty much any language of your choosing easily 
(Vala, Ruby, PHP (lol), Python, Rust, Go, Perl, Lua, Javascript, etc) 
that in itself is a really good reason.



On Thu, Aug 7, 2014 at 12:22 PM, 黄羽众 > wrote:


For the past few time, I am using gtkmm to development GUI
application, and I am really enjoy it.

I know that choose C as its implementation language makes gtk gain
a wonderful performance,
but recently GCC turn to C++.
https://gcc.gnu.org/gcc-4.8/changes.html

I think that as a complier which have to think a lot about
performance, it turn to C++ for code elegance and development speed,
a GUI application have no reason to continue using C stuff.

Actually gtk implement a object system as its essential part, that
did prove that GUI application need a object-oriented design.
And C++ could provide this as a language level feaure, needless to
implement it in application code.

So I suggest that it is possible to develop gtk in c++ as
main-line support?

Unlike gtkmm, which is just a wrapper from c++ to c, turn to c++
in main-line means a lot.

GCC choose this and get good result, I think gtk could have a try.



___
gtk-list mailing list
gtk-list@gnome.org 
https://mail.gnome.org/mailman/listinfo/gtk-list




___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list


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

2014-08-07 Thread Dub
tbh, the only reason I use GTK is because it is C.

While C++ is probably a better choice. C allows you to easier integrate it
with pretty much any language of your choosing easily (Vala, Ruby, PHP
(lol), Python, Rust, Go, Perl, Lua, Javascript, etc) that in itself is a
really good reason.


On Thu, Aug 7, 2014 at 12:22 PM, 黄羽众  wrote:

> For the past few time, I am using gtkmm to development GUI application,
> and I am really enjoy it.
>
> I know that choose C as its implementation language makes gtk gain a
> wonderful performance,
> but recently GCC turn to C++.  https://gcc.gnu.org/gcc-4.8/changes.html
>
> I think that as a complier which have to think a lot about performance, it
> turn to C++ for code elegance and development speed,
> a GUI application have no reason to continue using C stuff.
>
> Actually gtk implement a object system as its essential part, that did
> prove that GUI application need a object-oriented design.
> And C++ could provide this as a language level feaure, needless to
> implement it in application code.
>
> So I suggest that it is possible to develop gtk in c++ as main-line
> support?
>
> Unlike gtkmm, which is just a wrapper from c++ to c, turn to c++ in
> main-line means a lot.
>
> GCC choose this and get good result, I think gtk could have a try.
>
>
>
> ___
> gtk-list mailing list
> gtk-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-list
>
>
___
gtk-list mailing list
gtk-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-list